Service Layer high complexity mobile
1
Dependencies
1
Dependents
3
Entities
0
Integrations

Description

Handles client-side image compression and chunked, resumable uploads to the backend. Compresses images to under 500 KB using flutter_image_compress before transmission to minimise bandwidth for users with limited mobile data. Implements chunked upload with resume capability to handle poor network conditions gracefully.

Feature: Receipt Photo Upload

file-upload-service

Responsibilities

  • Compress images client-side to target size under 500 KB
  • Split large files into upload chunks for resumable transfer
  • Track and resume interrupted uploads
  • Validate file type (JPEG, PNG, PDF) and size before upload
  • Report upload progress to the UI layer

Interfaces

compressImage(imageFile, targetSizeKb)
uploadReceipt(expenseId, imageFile)
resumeUpload(uploadId)
cancelUpload(uploadId)
getUploadProgress(uploadId)
validateFileType(file)
validateFileSize(file, maxSizeBytes)
retryFailedUpload(uploadId)
getUploadStatus(uploadId)

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component