我碰到下面的错误,而试图上传使用AFNetworking/AFAmazonS3ClientAFNetworking/AFAmazonS3Client亚马逊文件上传
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”,这可能会危害您的机密信息
如何解决这个
感谢 Tonku
服务器
我没有使用Amazon SDK – user2140446 2013-03-08 07:48:40