This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Description
AFAmazonS3Manager *s3Manager = [[AFAmazonS3Manager alloc] initWithAccessKeyID:@"123" secret:@"123"];
s3Manager.requestSerializer.region = AFAmazonS3USStandardRegion;
s3Manager.requestSerializer.bucket = @"test-bucket";
// 2
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"imagetest" ofType:@"jpg"];
NSLog(@"filePath %@",filePath);
// 3
NSString *destinationPath = @"dummy.jpg";
[s3Manager putObjectWithFile:filePath destinationPath:@"destinationPath" parameters:nil progress:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
} success:^(id responseObject) {
// NSURL *resultURL = [self.requestSerializer.endpointURL URLByAppendingPathComponent:destinationPath];
NSLog(@"Upload complete : %@", responseObject);
} failure:^(NSError *error) {
NSLog(@"Error uploading photo : %@", error);
}];