Skip to main content

Overview

For files larger than 40MB, Launch uses native background upload modules that:
  • Continue uploading when the app is backgrounded
  • Handle network interruptions gracefully
  • Provide system-level progress tracking
  • Work reliably for very large files (up to 5GB)

Module Location

iOS Implementation

Uses URLSession with background configuration:

Key Features

  • Background transfers: iOS manages uploads even when app is suspended
  • Automatic retries: System retries on network failure
  • Progress callbacks: Real-time progress via delegate methods

Android Implementation

Uses Kotlin Coroutines for async uploads:
For true background persistence on Android, consider migrating to WorkManager. The current coroutine implementation works well but may be interrupted on app kill.

JavaScript API

Starting an Upload

Available Events

Utility Functions

Persistence

Upload state is persisted to AsyncStorage for resilience:
When the user navigates away and returns:
  1. Saved queue is loaded from AsyncStorage
  2. Native module is queried for active uploads
  3. Listeners are re-attached for ongoing uploads
  4. Progress UI is restored

Limitations

App Force-Kill: If the user force-kills the app, uploads may be lost. iOS background URLSession tasks may complete, but the app won’t receive the completion callback until next launch. Server-side tracking would be needed for full resume-after-kill support.

Debugging

Enable console logs to trace upload flow:
Check native logs:
  • iOS: Xcode Console
  • Android: adb logcat | grep LaunchReactNativeFileUploader

Test Checklist

  • Large file (>40MB) uses native upload
  • Progress events fire and UI updates
  • Upload completes after backgrounding the app

Troubleshooting

If native uploads stall, verify device background permissions and check native logs for errors.

Remove / Disable

To disable uploads while you configure S3, set: apps/mobile/features/feature-registry.tsxfeatureFlags.fileUploads = false For production removal guidance, see Removing Features.