尝试使用 AFNetworking / AFAmazonS3Client 将文件上传到 Amazon 时出现以下错误
s3Client = [[AFAmazonS3Client alloc] initWithAccessKeyID:@"mykey" secret:@"mysecretkey"];
s3Client.bucket = @"media.mysite.com";
[s3Client postObjectWithFile:video.assetPath destinationPath:@"/media/videos/" parameters:nil progress:
^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite){
DLog(@"%f%% Uploaded", (totalBytesWritten / (totalBytesExpectedToWrite * 1.0f) * 100));
}
success:^(id responseobject){
DLog(@"Success");
[self deleteAsset:video];
}failure:^(NSError* error){
DLog(@"Failed %@", error);
[self updateVideoAsset:video.assetID key:@"uploadStatus" value:[NSNumber numberWithInt:ESUploadNotStarted]];
}];
此服务器的证书无效。您可能正在连接到伪装成“media.myserver.com.s3.amazonaws.com”的服务器,这可能会使您的机密信息面临风险
如何解决这个问题
谢谢东姑