error: Error Domain=com.aliyun.oss.serverError Code=-203 "(null)" UserInfo={__name=Error, HostId=ssfd-avatar.oss-cn-hangzhou.aliyuncs.com, Message=Error status : 500., Code=CallbackFailed, RequestId=595DE73BDD373EE829329276}
代码是这样写的,不知道为什么,上传图片,一直报上面的错误,我没发现我的代码有什么问题
OSSPutObjectRequest
*request = [OSSPutObjectRequest
new
]; request.
bucketName =
@"ssfd-avatar"; request.
objectKey = [
NSString
stringWithFormat:
@"%@.jpg",[
self
MD5:append]]; request.
callbackParam =
@{
@"callbackUrl":url,
@"callbackBody"
:@"ossurl=http://${bucket}.oss-cn-hangzhou.aliyuncs.com/${object}&userid=${x:userid}"
}; request.
callbackVar =
@{
@"x:userid":userid
}; request.
uploadingData = data; request.
contentType =
@"image/jpeg"; request.
uploadProgress = ^(
int64_t bytesSent,
int64_t totalByteSent,
int64_t totalBytesExpectedToSend) {
NSLog(
@"%lld, %lld, %lld", bytesSent, totalByteSent, totalBytesExpectedToSend); };
OSSTask * task = [
client
putObject:request]; [task
continueWithBlock:^
id(
OSSTask *task) {
if (!task.
error) {
OSSPutObjectResult *result = task.
result;
NSLog
(@"upload object success!"
);
}
else { fail(
true);
NSLog
(
@"upload object failed, error: %@"
, task.
error
); }
return
nil; }];
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。