UploadJob constructor
UploadJob({
- required String id,
- required String filePath,
- required String url,
- int chunkSize = 1024 * 1024,
- HeaderBuilder? headerBuilder,
- ProgressCallback? onProgress,
- int maxRetries = 3,
- int retryCount = 0,
- UploadJobStatus status = UploadJobStatus.pending,
- UploadCompleteCallback? onComplete,
- UploadFailedCallback? onFailed,
- int priority = 0,
- bool isPaused = false,
- 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});