Skip to content

Commit

Permalink
#5.4.3
Browse files Browse the repository at this point in the history
- 修复Copy接口中,source为中文时会导致403的问题
  • Loading branch information
erichmzhang committed Apr 3, 2018
1 parent c39d602 commit 095ceb3
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#5.4.3
- 修复Copy接口中,source为中文时会导致403的问题

# 5.4.2
- 修复了返回数组类型的属性,如果数组内容只有一个时候会解析失败的问题。

Expand Down
6 changes: 3 additions & 3 deletions QCloudCOSXML.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "QCloudCOSXML"
s.version = "5.4.2"
s.version = "5.4.3"
s.summary = "QCloudCOSXML 腾讯云iOS-SDK组件"

s.homepage = "https://cloud.tencent.com/"
Expand All @@ -9,10 +9,10 @@ s.version = "5.4.2"
s.source = { :git => "https://github.com/tencentyun/qcloud-sdk-ios.git", :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
s.source_files = 'QCloudCOSXML/Classes/**/*'
s.dependency "QCloudCore",'5.4.2'
s.dependency "QCloudCore",'5.4.3'

s.subspec 'Transfer' do |sbt|
sbt.source_files = 'QCloudCOSXML/Classes/Transfer/*','QCloudCOSXML/Classes/Base/*'
sbt.dependency "QCloudCore",'5.4.2'
sbt.dependency "QCloudCore",'5.4.3'
end
end
2 changes: 1 addition & 1 deletion QCloudCOSXML/Classes/Manager/QCloudBucket.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ + (NSDictionary *)modelCustomPropertyMapper
return @{
@"name" :@"Name",
@"location" :@"Location",
@"createDate" :@"CreateDate",
@"createDate" :@"CreationDate",
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// QCloudListAllMyBucketsResult+CustomModelTransfer.h
// FLEX
//
// Created by erichmzhang(张恒铭) on 03/04/2018.
//

#import <QCloudCOSXML/QCloudCOSXML.h>

@interface QCloudListAllMyBucketsResult (CustomModelTransfer)

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// QCloudListAllMyBucketsResult+CustomModelTransfer.m
// FLEX
//
// Created by erichmzhang(张恒铭) on 03/04/2018.
//

#import "QCloudListAllMyBucketsResult+CustomModelTransfer.h"

@implementation QCloudListAllMyBucketsResult (CustomModelTransfer)
- (NSDictionary *)modelCustomWillTransformFromDictionary:(NSDictionary *)dic {

if (!dic) {
return dic;
}
NSMutableDictionary* transfromDic = [NSMutableDictionary dictionaryWithDictionary:dic];
NSArray* transformArrayKeypaths = @[
@"Buckets",
];

for (NSString* keyPath in transformArrayKeypaths) {
id object = [dic valueForKeyPath:keyPath];
if (!object) {
continue;
}
if ([object isKindOfClass:[NSNull class]]) {
continue;
}
if (![object isKindOfClass:[NSArray class]]) {
if ([object isKindOfClass:[NSDictionary class]]) {
id value = [[object allValues] firstObject];
if ([value isKindOfClass:[NSArray class]]) {
[transfromDic setValue:value forKey:keyPath];
} else {
[transfromDic setValue:@[value] forKey:keyPath];
}
}
// [transfromDic setValue:@[object] forKeyPath:keyPath];
}
}

return transfromDic;

}

@end
6 changes: 3 additions & 3 deletions QCloudCOSXML/Classes/QCloudCOSXMLVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

#ifndef QCloudCOSXMLModuleVersion_h
#define QCloudCOSXMLModuleVersion_h
#define QCloudCOSXMLModuleVersionNumber 504002
#define QCloudCOSXMLModuleVersionNumber 504003

//dependency
#if QCloudCoreModuleVersionNumber != 504002
#error "库QCloudCOSXML依赖QCloudCore最小版本号为5.4.2,当前引入的QCloudCore版本号过低,请及时升级后使用"
#if QCloudCoreModuleVersionNumber != 504003
#error "库QCloudCOSXML依赖QCloudCore最小版本号为5.4.3,当前引入的QCloudCore版本号过低,请及时升级后使用"
#endif

//
Expand Down
2 changes: 1 addition & 1 deletion QCloudCOSXML/Classes/QCloudCOSXMLVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "QCloudCOSXMLVersion.h"
NSString * const QCloudCOSXMLModuleVersion = @"5.4.2";
NSString * const QCloudCOSXMLModuleVersion = @"5.4.3";
NSString * const QCloudCOSXMLModuleName = @"QCloudCOSXML";
@interface QCloudQCloudCOSXMLLoad : NSObject
@end
Expand Down
5 changes: 3 additions & 2 deletions QCloudCOSXML/Classes/Transfer/QCloudCOSXMLCopyObjectRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import "QCloudCompleteMultipartUploadRequest.h"
#import "QCloudCompleteMultipartUploadInfo.h"
#import "QCloudHeadObjectRequest.h"
#import "QCloudURLHelper.h"
static NSString* const kTempServiceKey = @"tempServiceKey";
static NSString* const kContentLengthKey = @"Content-Length";
static NSString* const kLastModifiedKey = @"Last-Modified";
Expand Down Expand Up @@ -90,7 +91,7 @@ - (void)simpleCopy {
NSMutableString* objectCopySource = [NSMutableString string];
NSString* serviceURL =[service.configuration.endpoint serverURLWithBucket:self.sourceBucket appID:self.sourceAPPID].absoluteString;
[objectCopySource appendString:[serviceURL componentsSeparatedByString:@"://"][1]];
[objectCopySource appendFormat:@"/%@",self.sourceObject];
[objectCopySource appendFormat:@"/%@",QCloudPercentEscapedStringFromString(self.sourceObject)];
request.objectCopySource = objectCopySource;
QCloudLogDebug(@"Object copy source url %@", objectCopySource);
[[QCloudCOSXMLService defaultCOSXML] PutObjectCopy:request];
Expand Down Expand Up @@ -145,7 +146,7 @@ - (void)uploadCopyParts {
NSMutableString* objectCopySource = [NSMutableString string];
NSString* serviceURL =[service.configuration.endpoint serverURLWithBucket:self.sourceBucket appID:self.sourceAPPID].absoluteString;
[objectCopySource appendString:[serviceURL componentsSeparatedByString:@"://"][1]];
[objectCopySource appendFormat:@"/%@",self.sourceObject];
[objectCopySource appendFormat:@"/%@",QCloudPercentEscapedStringFromString(self.sourceObject)];
request.source = objectCopySource;
request.uploadID = self.uploadID;
request.partNumber = i+1;
Expand Down
2 changes: 1 addition & 1 deletion QCloudCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "QCloudCore"
s.version = "5.4.2"
s.version = "5.4.3"
s.summary = "QCloudCore--腾讯云iOS-SDK Foundation"

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion QCloudCore/Classes/QCloudCoreVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#ifndef QCloudCoreModuleVersion_h
#define QCloudCoreModuleVersion_h
#define QCloudCoreModuleVersionNumber 504002
#define QCloudCoreModuleVersionNumber 504003

//dependency

Expand Down
2 changes: 1 addition & 1 deletion QCloudCore/Classes/QCloudCoreVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "QCloudCoreVersion.h"
NSString * const QCloudCoreModuleVersion = @"5.4.2";
NSString * const QCloudCoreModuleVersion = @"5.4.3";
NSString * const QCloudCoreModuleName = @"QCloudCore";
@interface QCloudQCloudCoreLoad : NSObject
@end
Expand Down

0 comments on commit 095ceb3

Please sign in to comment.