FileUploadTask
Uploads a local file to CAWS in the background.
Created and started by FileStorageReference.upload. Await onComplete to get the CarpFileResponse of the stored file.
- Inheritance
-
- Object
- CarpServiceTask
- FileUploadTask
Properties
file
getter/setter pair
The file to upload.
metadata
Metadata for the file.
The filename and size entries are added when the upload starts.
name
The file name, i.e. the last segment of the file path.
onComplete
Completes with the CarpFileResponse when the upload succeeds.
Completes with an error for an unsuccessful HTTP response whose error body can be decoded, or if the task is canceled. Other failures are not consistently forwarded here and may leave this future pending.
Methods
cancel
override
Cancels the upload task and completes onComplete with an error.