Skip to content

Commit

Permalink
feat(S3): adds suspend and resume features for multipart upload tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Brennan Stehling committed Jun 1, 2022
1 parent 0b1bf25 commit db0ab5a
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 60 deletions.
24 changes: 24 additions & 0 deletions AWSS3/AWSS3TransferUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,30 @@ handleEventsForBackgroundURLSession:(NSString *)identifier
expression:(nullable AWSS3TransferUtilityDownloadExpression *)expression
completionHandler:(nullable AWSS3TransferUtilityDownloadCompletionHandlerBlock)completionHandler;

/**
Suspends multipart upload
@param multipartUploadTask task
*/
- (nullable NSError *)suspendMultipartUpload:(AWSS3TransferUtilityMultiPartUploadTask *)multipartUploadTask;

/**
Suspends all multipart uploads.
@param completionHandler completion handler
*/
- (void)suspendAllMultipartUploadsWithCompletionHandler:(nullable AWSS3TransferUtilityMultiPartUploadSuspendBlock)completionHandler;

/**
Resumes a multipart upload.
@param multiPartUploadTask The task to resume
*/
- (nullable NSError *)resumeMultipartUpload:(nonnull AWSS3TransferUtilityMultiPartUploadTask *)multiPartUploadTask;

/**
Resumes all multipart uploads.
@param completionHandler completion handler
*/
- (void)resumeAllMultipartUploadsWithCompletionHandler:(nullable AWSS3TransferUtilityMultiPartUploadResumeBlock)completionHandler;

/**
Assigns progress feedback and completion handler blocks. This method should be called when the app was suspended while the transfer is still happening.
Expand Down
Loading

0 comments on commit db0ab5a

Please sign in to comment.