Skip to content

Commit

Permalink
Fix the problem of CRC verification failure caused by network disconn…
Browse files Browse the repository at this point in the history
…ection in resumableupload
  • Loading branch information
wushuai1415 authored and huiguangjun committed Dec 30, 2021
1 parent e3a196e commit b0a243b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions AliyunOSSSDK/OSSClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -1608,10 +1608,12 @@ - (OSSTask *)multipartUpload:(OSSMultipartUploadRequest *)request resumable:(BOO
#pragma clang diagnostic pop

NSDictionary *tPartInfo = [localPartInfos objectForKey: [@(remotePartNumber) stringValue]];
info.crc64 = [tPartInfo[@"crc64"] unsignedLongLongValue];

[uploadedPartInfos addObject:info];
[alreadyUploadIndex addObject:@(remotePartNumber)];
if (tPartInfo != nil) {
info.crc64 = [tPartInfo[@"crc64"] unsignedLongLongValue];

[uploadedPartInfos addObject:info];
[alreadyUploadIndex addObject:@(remotePartNumber)];
}
}];

if ([alreadyUploadIndex count] > 0 && request.uploadProgress && uploadFileSize) {
Expand Down

0 comments on commit b0a243b

Please sign in to comment.