|
14 | 14 | #import "QCloudCompleteMultipartUploadRequest.h" |
15 | 15 | #import "QCloudCompleteMultipartUploadInfo.h" |
16 | 16 | #import "QCloudHeadObjectRequest.h" |
| 17 | +#import "QCloudURLHelper.h" |
17 | 18 | static NSString* const kTempServiceKey = @"tempServiceKey"; |
18 | 19 | static NSString* const kContentLengthKey = @"Content-Length"; |
19 | 20 | static NSString* const kLastModifiedKey = @"Last-Modified"; |
@@ -90,7 +91,7 @@ - (void)simpleCopy { |
90 | 91 | NSMutableString* objectCopySource = [NSMutableString string]; |
91 | 92 | NSString* serviceURL =[service.configuration.endpoint serverURLWithBucket:self.sourceBucket appID:self.sourceAPPID].absoluteString; |
92 | 93 | [objectCopySource appendString:[serviceURL componentsSeparatedByString:@"://"][1]]; |
93 | | - [objectCopySource appendFormat:@"/%@",self.sourceObject]; |
| 94 | + [objectCopySource appendFormat:@"/%@",QCloudPercentEscapedStringFromString(self.sourceObject)]; |
94 | 95 | request.objectCopySource = objectCopySource; |
95 | 96 | QCloudLogDebug(@"Object copy source url %@", objectCopySource); |
96 | 97 | [[QCloudCOSXMLService defaultCOSXML] PutObjectCopy:request]; |
@@ -145,7 +146,7 @@ - (void)uploadCopyParts { |
145 | 146 | NSMutableString* objectCopySource = [NSMutableString string]; |
146 | 147 | NSString* serviceURL =[service.configuration.endpoint serverURLWithBucket:self.sourceBucket appID:self.sourceAPPID].absoluteString; |
147 | 148 | [objectCopySource appendString:[serviceURL componentsSeparatedByString:@"://"][1]]; |
148 | | - [objectCopySource appendFormat:@"/%@",self.sourceObject]; |
| 149 | + [objectCopySource appendFormat:@"/%@",QCloudPercentEscapedStringFromString(self.sourceObject)]; |
149 | 150 | request.source = objectCopySource; |
150 | 151 | request.uploadID = self.uploadID; |
151 | 152 | request.partNumber = i+1; |
|
0 commit comments