Skip to content

Commit db0ab5a

Browse files
author
Brennan Stehling
committed
feat(S3): adds suspend and resume features for multipart upload tasks
#4167
1 parent 0b1bf25 commit db0ab5a

6 files changed

+288
-60
lines changed

AWSS3/AWSS3TransferUtility.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,30 @@ handleEventsForBackgroundURLSession:(NSString *)identifier
620620
expression:(nullable AWSS3TransferUtilityDownloadExpression *)expression
621621
completionHandler:(nullable AWSS3TransferUtilityDownloadCompletionHandlerBlock)completionHandler;
622622

623+
/**
624+
Suspends multipart upload
625+
@param multipartUploadTask task
626+
*/
627+
- (nullable NSError *)suspendMultipartUpload:(AWSS3TransferUtilityMultiPartUploadTask *)multipartUploadTask;
628+
629+
/**
630+
Suspends all multipart uploads.
631+
@param completionHandler completion handler
632+
*/
633+
- (void)suspendAllMultipartUploadsWithCompletionHandler:(nullable AWSS3TransferUtilityMultiPartUploadSuspendBlock)completionHandler;
634+
635+
/**
636+
Resumes a multipart upload.
637+
@param multiPartUploadTask The task to resume
638+
*/
639+
- (nullable NSError *)resumeMultipartUpload:(nonnull AWSS3TransferUtilityMultiPartUploadTask *)multiPartUploadTask;
640+
641+
/**
642+
Resumes all multipart uploads.
643+
@param completionHandler completion handler
644+
*/
645+
- (void)resumeAllMultipartUploadsWithCompletionHandler:(nullable AWSS3TransferUtilityMultiPartUploadResumeBlock)completionHandler;
646+
623647
/**
624648
Assigns progress feedback and completion handler blocks. This method should be called when the app was suspended while the transfer is still happening.
625649

0 commit comments

Comments
 (0)