A Flutter app for uploading movie files to a Raspberry Pi with advanced features like background uploads, pause/resume functionality, and unlimited simultaneous uploads.
- Unlimited File Selection: Select multiple movie files at once
- Simultaneous Uploads: Upload multiple files simultaneously
- Pause/Resume: Pause and resume uploads at any time
- Background Uploads: Uploads continue when app is in background
- Progress Tracking: Real-time progress for each file
- Chunked Uploads: Large files are uploaded in chunks for reliability
- Error Handling: Robust error handling with retry functionality
- Modern UI: Beautiful Material Design 3 interface
- MP4, AVI, MKV, MOV, WMV, FLV, WebM, M4V
- 3GP, TS, MTS, M2TS, VOB, OGV, MXF, ASF
- Raspberry Pi with Python 3.7+
- External storage mounted at
/media/soulstream
-
Install Python dependencies:
cd server pip3 install -r requirements.txt -
Create upload directory:
sudo mkdir -p /media/soulstream sudo chown pi:pi /media/soulstream
-
Start the server:
python3 upload_server.py
-
For production, use systemd service:
sudo cp soulstream-upload.service /etc/systemd/system/ sudo systemctl enable soulstream-upload sudo systemctl start soulstream-upload
- Flutter SDK 3.0.0+
- Android Studio / VS Code
- Android device or emulator
-
Install dependencies:
flutter pub get
-
Update server IP (if different from 192.168.18.20):
- Edit
lib/services/upload_service.dart - Change
_baseUrlto your Raspberry Pi's IP address
- Edit
-
Build and run:
flutter run
-
Build APK:
flutter build apk --release
Edit server/upload_server.py to modify:
UPLOAD_FOLDER: Directory where files are savedALLOWED_EXTENSIONS: Supported file typesMAX_CONTENT_LENGTH: Maximum file size
Edit lib/services/upload_service.dart to modify:
_baseUrl: Server IP address_chunkSize: Upload chunk size (default: 1MB)
- Tap the "Upload Files" button
- Select one or more movie files
- Files will start uploading immediately
- Monitor progress in the app
- Pause/Resume: Swipe left on an upload and tap pause/resume
- Cancel: Swipe left and tap cancel
- Retry: For failed uploads, swipe left and tap retry
- Remove: Swipe left and tap remove to delete from history
The app supports background uploads:
- Uploads continue when app is minimized
- Progress is saved and restored on app restart
- Failed uploads can be retried
-
Permission Denied:
- Grant storage permissions in app settings
- Ensure server directory has proper permissions
-
Network Connection:
- Verify Raspberry Pi IP address
- Check network connectivity
- Ensure server is running on port 8080
-
Large File Uploads:
- Increase chunk size for better performance
- Check available disk space on Pi
Check server logs at /var/log/soulstream_upload.log:
tail -f /var/log/soulstream_upload.logEnable debug mode in Flutter:
flutter run --debugUpload a file chunk
file: File datachunk_index: Current chunk indextotal_chunks: Total number of chunksfile_size: Total file sizeupload_id: Unique upload identifier
Get server status and disk usage
List all uploaded files
Health check endpoint
- The server accepts HTTP connections (not HTTPS)
- File validation is performed on server side
- Filenames are sanitized to prevent path traversal
- Consider adding authentication for production use
- Network: Use wired connection for better upload speeds
- Storage: Use SSD or fast storage on Raspberry Pi
- Chunk Size: Adjust chunk size based on network conditions
- Concurrent Uploads: Limit simultaneous uploads based on Pi performance
This project is open source and available under the MIT License.