UploadJob constructor

UploadJob({
  1. required String id,
  2. required String filePath,
  3. required String url,
  4. int chunkSize = 1024 * 1024,
  5. HeaderBuilder? headerBuilder,
  6. ProgressCallback? onProgress,
  7. int maxRetries = 3,
  8. int retryCount = 0,
  9. UploadJobStatus status = UploadJobStatus.pending,
  10. UploadCompleteCallback? onComplete,
  11. UploadFailedCallback? onFailed,
  12. int priority = 0,
  13. bool isPaused = false,
  14. bool isManuallyPaused = false,
})

Creates a new upload job

id must be unique across all upload jobs filePath must point to an existing file url is the endpoint where chunks will be uploaded chunkSize determines how the file is split (default: 1MB) priority affects queue ordering (default: 0) maxRetries sets retry limit (default: 3)

Implementation

UploadJob(
    {required this.id,
    required this.filePath,
    required this.url,
    this.chunkSize = 1024 * 1024,
    this.headerBuilder,
    this.onProgress,
    this.maxRetries = 3,
    this.retryCount = 0,
    this.status = UploadJobStatus.pending,
    this.onComplete,
    this.onFailed,
    this.priority = 0,
    this.isPaused = false,
    this.isManuallyPaused = false});