Attachment Upload Service
Component Detail
Service Layer
high complexity
mobile
1
Dependencies
2
Dependents
1
Entities
0
Integrations
Description
Service responsible for uploading activity attachment files to the backend via multipart POST. In offline mode it serialises binary blobs into the Drift SQLCipher mutation outbox for deferred upload via the background sync mechanism. Tracks per-file upload progress as a reactive stream.
attachment-upload-service
Responsibilities
- Upload attachment files to REST API via multipart POST with JWT bearer auth
- Serialise binary blobs to the SQLCipher mutation outbox when the device is offline
- Track per-file upload progress and expose as a Stream for UI progress display
- Persist confirmed remote file references to the Activity Attachments Table after server acknowledgement
- Surface upload failures to the caller with typed AttachmentUploadException
Interfaces
uploadAttachment(String activityId, FileRef fileRef) -> Future<AttachmentRecord>
uploadProgressStream(FileRef fileRef) -> Stream<double>
queueOfflineAttachment(String activityId, FileRef fileRef)
retryFailedUploads(String activityId)
Relationships
Dependents (2)
Components that depend on this component
Related Data Entities (1)
Data entities managed by this component