Skip to content

How do I suspend, continue or cancle task when use S3 multipartUpload #616

Answered by adam-fowler
yjjandyxy asked this question in Q&A
Discussion options

You must be logged in to vote

You can throw an error from the progress function to cancel a multipart upload.

If you called multipartUpload with abortOnFail set to true it will abort the multipart upload and clean up.

If you call multipartUpload with abortOnFail set to false instead of aborting the multipart upload on an error being thrown it throws a new error type S3ErrorType.multipart.abortedUpload which includes all the information you need to resume the upload in a S3.ResumeMultipartUploadRequest and the error that caused the upload to fail. You can then use the S3.ResumeMultipartUploadRequest object in resumeMultipartUpload to resume the multipart upload.

You can find out more here

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@yjjandyxy
Comment options

@adam-fowler
Comment options

@yjjandyxy
Comment options

Answer selected by adam-fowler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants