阿里云上传图片错误
上传图片从七牛切换为阿里云,看配置什么都没有什么问题,但就是不行!代码和错误信息如下:
OSSPutObjectRequest * put = [OSSPutObjectRequest new];
put.callbackParam = [model getCallbackParam];
put.callbackVar = [model getCallbackVar];
put.bucketName = model.butcketName;
put.objectKey = model.objectKey;
put.uploadingData = data;
put.contentType = @"application/octet-stream";
put.uploadProgress = ^(int64_t bytesSent, int64_t totalByteSent, int64_t totalBytesExpectedToSend) {
NSLog(@"%lld, %lld, %lld", bytesSent, totalByteSent, totalBytesExpectedToSend);
};
OSSClient *client = [DDUploadUtil createClient: model];
OSSTask *putTask = [client putObject: put];
[putTask continueWithBlock:^id _Nullable(OSSTask * _Nonnull task) {
task = [client presignPublicURLWithBucketName:model.butcketName withObjectKey: model.objectKey];
NSLog(@"objectKey: %@", put.objectKey);
if (!task.error) {
NSLog(@"upload object success!");
} else {
NSLog(@"upload object failed, error: %@" , task.error);
}
return nil;
}];
CFNetwork SSLHandshake failed (-9824)
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论