tus_background_upload 0.1.1 copy "tus_background_upload: ^0.1.1" to clipboard
tus_background_upload: ^0.1.1 copied to clipboard

TUS resumable uploads that keep running while the app is backgrounded or the device is locked, over native transports (iOS background URLSession, Android WorkManager via background_downloader).

Changelog #

0.1.1 #

  • Fix: the TUS PATCH was sent with the file's own mime type (e.g. video/mp4) instead of application/offset+octet-stream, so spec-compliant servers (Bunny among them) rejected it. background_downloader's native binary-upload code overwrites the Content-Type header with the task's mimeType on both platforms; the transport now sets mimeType to the TUS content type explicitly.
  • A failed PATCH now folds the HTTP response code, exception description, and response body into the thrown HttpException message instead of only the final TaskStatus.

0.1.0 #

  • Initial release.
  • TusUploader: TUS protocol state machine with pause (server offset kept), resume (TUS HEAD + continue), cancel, and whole-file progress rescaling.
  • BackgroundDownloaderTusTransport: the PATCH runs as a native background transfer (iOS background URLSession, Android WorkManager), so uploads keep running while the app is backgrounded or the device is locked.
  • configureBackgroundUploads: one-call setup for long-running transfers — Android runInForeground (lifts the ~9-minute WorkManager cap) with the mandatory notification, and a configurable iOS resource timeout (default 8h).
  • BackgroundMultipartUploader: multipart uploads for regular attachments over the same native transports.
  • createTusUpload: TUS creation-extension helper (Upload-Length/Upload-MetadataLocation).
  • Optional http.Client injection on createTusUpload and BackgroundDownloaderTusTransport (connection reuse, testability).
  • requestBackgroundUploadNotificationPermission: runtime notification-permission request for the Android 13+ foreground-service promotion.
0
likes
150
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

TUS resumable uploads that keep running while the app is backgrounded or the device is locked, over native transports (iOS background URLSession, Android WorkManager via background_downloader).

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

background_downloader, flutter, http, path

More

Packages that depend on tus_background_upload