上传图片从七牛切换为阿里云,看配置什么都没有什么问题,但就是不行!代码和错误信息如下:
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)