Skip to content

Conversation

@thomasttvo
Copy link
Collaborator

@thomasttvo thomasttvo commented Oct 10, 2025

POC, TBD


Note

Revamps Android upload with a queued engine and centralized notifications, introduces initialize(), removes chunking API, updates JS types and example app, and adds protobuf/datastore build setup.

  • Android:
    • Upload engine: Add UploadQueue for serial queued uploads, overall progress, and completion tracking; refactor UploadWorker to process queue, throttle progress, and update notifications directly.
    • Notifications: New NotificationConfigs set via initialize(...); foreground info/notification building centralized; progress now uses UploadQueue.progressPercentage().
    • Networking: okhttpUpload now returns UploadResponse (code, message, headers, body); EventReporter.success consumes UploadResponse.
    • API removals: Remove file chunking (ChunkUtils.kt, JS chunkFile), and per-upload Android notification fields from Upload/start options.
    • Build: Add protobuf Gradle plugin/config and deps; add androidx.datastore:datastore.
  • JS API (breaking):
    • Add Upload.initialize(options: AndroidInitializationOptions); startUpload no longer accepts android options.
    • Types updated: introduce AndroidInitializationOptions; remove android from UploadOptions; remove chunkFile exports.
  • Example app:
    • Initialize notifications, use RNFS test file and Notifee channel; simplify to raw uploads; remove image picker multipart flow; bump TypeScript and deps; raise Android minSdk to 24.
  • iOS:
    • Remove chunkFile method from native module (no functional upload changes).

Written by Cursor Bugbot for commit 1f3a08e. This will update automatically on new commits. Configure here.

@thomasttvo thomasttvo marked this pull request as draft October 10, 2025 01:03
Comment on lines 66 to 68
workManager
.beginUniqueWork(WORKER_ID, ExistingWorkPolicy.KEEP, request)
.enqueue()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the effective change here is using WORKER_ID to beginUniqueWork instead of upload.id which would create a new unique work for each upload? 👏👏

Does a WORKER_ID worker just pulls from the UploadQueue? Or is the UploadQueue just for keeping track and getting stats?

thomasvo added 4 commits October 14, 2025 16:25
…ad-v2

# Conflicts:
#	android/src/main/java/com/vydia/RNUploader/UploaderModule.kt
#	example/RNBGUExample/App.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants