-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: absolute paths not working in sandbox #3794
Conversation
…ming upload tasks that were pending upon app kill/restart
ebdf97d
to
a100f03
Compare
AWSS3/AWSS3TransferUtility.m
Outdated
@@ -325,8 +332,10 @@ + (void)registerS3TransferUtilityWithConfiguration:(AWSServiceConfiguration *)co | |||
recoverState:NO | |||
completionHandler:completionHandler]; | |||
if (s3TransferUtility) { | |||
NSAssert(_serviceClients != nil, @"Value is required"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using NSCAssert
instead of NSAssert
since it does not work with ARC.
AWSS3/AWSS3TransferUtility.m
Outdated
@@ -38,7 +38,7 @@ | |||
static NSString *const AWSS3TransferUtilityRetrySucceeded = @"AWSS3TransferUtilityRetrySucceeded"; | |||
static NSUInteger const AWSS3TransferUtilityMultiPartSize = 5 * 1024 * 1024; | |||
static NSString *const AWSS3TransferUtiltityRequestTimeoutErrorCode = @"RequestTimeout"; | |||
static int const AWSS3TransferUtilityMultiPartDefaultConcurrencyLimit = 5; | |||
static int const AWSS3TransferUtilityMultiPartDefaultConcurrencyLimit = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value should not be changed as a part of this bug fix.
AWSS3/AWSS3TransferUtility.m
Outdated
@@ -1395,6 +1396,9 @@ - (void) retryUpload: (AWSS3TransferUtilityUploadTask *) transferUtilityUploadTa | |||
} | |||
} | |||
|
|||
//Save in Database after the file has been created, so that file can be referenced incase upload is paused and needs to be restarted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put do this if there is no error by adjusting the if statement below. I think that makes sense.
if (!subTaskCreationError) {
//Save in Database after the file has been created, so that file can be referenced incase upload is paused and needs to be restarted.
[AWSS3TransferUtilityDatabaseHelper insertMultiPartUploadRequestSubTaskInDB:transferUtilityMultiPartUploadTask subTask:subTask
databaseQueue:self.databaseQueue];
} else {
//Abort the request, so the server can clean up any partials.
[self callAbortMultiPartForUploadTask:transferUtilityMultiPartUploadTask];
transferUtilityMultiPartUploadTask.status = AWSS3TransferUtilityTransferStatusError;
//Add it to list of completed Tasks
[self.completedTaskDictionary setObject:transferUtilityMultiPartUploadTask forKey:transferUtilityMultiPartUploadTask.transferID];
//Clean up.
[self cleanupForMultiPartUploadTask:transferUtilityMultiPartUploadTask];
return [AWSTask taskWithError:subTaskCreationError];
}
LGTM |
* fix: absolute paths not working in sandbox and not automatically resuming upload tasks that were pending upon app kill/restart
Issue #1697
Description of changes:
The purpose of the PR is to fix the following 2 issues:
Check points:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.