Skip to content

jonasermert/Jonas-Drive

Repository files navigation

Jonas Drive

Flutter file sharing app inspired by the uploaded HiUpload project. Login, registration, account pages, plans and Stripe/payment are intentionally removed.

What changed in this reviewed version

  • Closer visual match to the original Tailwind/Indigo layout
  • Cleaner S3 configuration validation in the UI
  • Safer share links: if AWS_S3_PUBLIC_BASE_URL is empty, the app creates a presigned S3 GET link instead of assuming the bucket is public
  • Content type detection for uploads
  • Responsive file rows for mobile and desktop widths
  • Usage badge with configurable local quota display
  • More robust local file model and migration from the first local storage key

Features

  • Pick and upload multiple files directly to Amazon S3
  • Local file list with upload date, size and usage display
  • Copy shareable links to the clipboard
  • Delete local entries and try to delete the S3 object
  • ENV-based S3 settings

Screenshots

Jonas Drive Screenshot 1 Jonas Drive Screenshot 2

Setup

flutter create .
flutter pub get
cp .env.example .env

Fill in .env:

AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=eu-central-1
AWS_S3_BUCKET=your-bucket-name
AWS_S3_PREFIX=uploads
AWS_S3_PUBLIC_BASE_URL=
AWS_S3_LINK_EXPIRES_SECONDS=604800
STORAGE_LIMIT_BYTES=5368709120

Run:

flutter run

S3 CORS

For direct uploads from Flutter Web, your bucket needs CORS rules that allow PUT, GET and DELETE from your app origin. For local testing you can start with this and tighten it later:

[
  {
    "AllowedHeaders": ["*"],
    "AllowedMethods": ["GET", "PUT", "DELETE"],
    "AllowedOrigins": ["*"],
    "ExposeHeaders": ["ETag"],
    "MaxAgeSeconds": 3000
  }
]

Important security note

This project signs S3 requests inside the Flutter client because you asked to enter your S3 data manually in .env. That is okay for learning and private local testing, but not for a real public app. In production, use a small backend that creates presigned upload URLs so your AWS secret key never ships to users.

Also note: the app stores only a local upload list in SharedPreferences. It does not query your whole S3 bucket. Files uploaded from another device will not appear automatically.

Android setup after unzip

This ZIP intentionally focuses on the Flutter source. After unzipping, generate platform folders once:

flutter create .
cp .env.example .env
flutter pub get

For Android, run the included SDK fix immediately after flutter create .:

chmod +x scripts/fix_android_compile_sdk.sh
./scripts/fix_android_compile_sdk.sh
flutter clean
flutter pub get
flutter run -d emulator-5554

Why this exists: your current Android setup reports that file_picker is compiled against Android 34 while flutter_plugin_android_lifecycle needs Android 36. The script patches the app project and, if necessary, the local Pub cache plugin build files. See docs/android_compile_sdk_fix.md.

If SDK 36 is missing, install it with Android Studio SDK Manager or:

~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-36" "build-tools;36.0.0"

About

A modern Flutter file-sharing app with direct Amazon S3 uploads, local file history, storage usage tracking, and shareable file links.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages