我正在从以下代码上传图片 -
NSData *imageData = UIImageJPEGRepresentation(image, 1.0);
AmazonS3Client *s3Client = [[[AmazonS3Client alloc] initWithAccessKey:ACCESS_KEY_ID withSecretKey:SECRET_KEY] autorelease];
s3Client.timeout = 240;
NSString *bucketName = [NSString stringWithFormat:@"test/images/"];
NSString *imageName = [NSString stringWithFormat:@"testimage.jpg"];
S3PutObjectRequest *objReq = [[S3PutObjectRequest alloc] initWithKey:imageName inBucket:bucketName];
objReq.contentType = @"image/jpeg";
objReq.data = imageData;
objReq.delegate = self;
objReq.contentLength = [imageData length];
[s3Client putObject:objReq];
我收到以下错误 -
S3Response.m|-[S3Response connection:didFailWithError:]|234|UserInfo.NSUnderlyingError = 错误域=kCFErrorDomainCFNetwork 代码=-1003 “找不到具有指定主机名的服务器。” 用户信息=0xac62aa0{NSErrorFailingURLKey=https://test/images/.s3.amazonaws.com/testimage.jpg
请告诉我我做错了什么。