Objective c AF3管理器错误

Objective c AF3管理器错误,objective-c,amazon-web-services,amazon-s3,xcode6,Objective C,Amazon Web Services,Amazon S3,Xcode6,我正在尝试在我的应用程序中使用AFAmazonS3Manager。我正在尝试将照片上载到Amazon,但不断出现以下错误: Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server." UserInfo=0x1740e3f00 {NSUnderlyingError=0x170247dd0 "The requested URL was not found on this serv

我正在尝试在我的应用程序中使用AFAmazonS3Manager。我正在尝试将照片上载到Amazon,但不断出现以下错误:

Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server." UserInfo=0x1740e3f00 {NSUnderlyingError=0x170247dd0 "The requested URL was not found on this server.", NSErrorFailingURLStringKey=file:///var/mobile/Containers/Data/Application/myInfo, NSErrorFailingURLKey=file:///var/mobile/Containers/Data/Application/myInfo, NSLocalizedDescription=The requested URL was not found on this server.
我的代码很简单:

    AFAmazonS3Manager * s3Manager = [[AFAmazonS3Manager alloc]initWithAccessKeyID:amazonAccessKey secret:amazonSecret];
s3Manager.requestSerializer.region = AFAmazonS3USStandardRegion;
s3Manager.requestSerializer.bucket = amazonBucket;

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:photoName];
[UIImagePNGRepresentation(photo) writeToFile:filePath atomically:YES];

[s3Manager postObjectWithFile:filePath destinationPath:@"" parameters:nil progress:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {

    int percent = roundf((float)totalBytesWritten / (float)totalBytesExpectedToWrite * 100);
    NSLog(@"Percent Complete: %d%%",percent);

我解决这个问题已经好几天了。我不熟悉使用AWS,所以我不知道我做错了什么。

根据错误消息,可能您传递的请求URL无效,或者您提供的路径中不存在该图像。请检查您使用的URL路径是否存在图像,或者通过在浏览器中复制粘贴该URL来检查该图像是否有效。以下链接也可能对您有所帮助: