IOS上传图片失败
先使用下面这段代码替换掉你的加签函数,如果可以正常运行的话就是你的加签函数有问题,然后再仔细排查一下加签函数的编写逻辑~
[ossclient setGenerateToken:^(NSString *method, NSString *md5, NSString *type, NSString *date, NSString *xoss, NSString *resource){
NSString *signature = nil;
NSString *content = [NSString stringWithFormat:@'%@\n%@\n%@\n%@\n%@%@', method, md5, type, date, xoss, resource];
signature = [OSSTool calBase64Sha1WithData:content withKey:secretKey];
signature = [NSString stringWithFormat:@'OSS %@:%@', accessKey, signature];
return signature;
}];
赞0
踩0