AFNetworking Client for the Amazon S3 API
Objective-C Ruby
Pull request Compare This branch is 64 commits behind AFNetworking:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
AFAmazonS3Client
AFAmazonS3Client.podspec
LICENSE
README.md

README.md

AFAmazonS3Client

AFAmazonS3Client is an AFHTTPClient subclass for interacting with the Amazon S3 API.

As the S3 API returns XML responses, you may find it useful to include AFKissXMLRequestOperation (just remember to do -registerHTTPOperationClass:)

Example Usage

AFAmazonS3Client *s3Client = [[AFAmazonS3Client alloc] initWithAccessKeyID:@"..." secret:@"..."];
s3Client.region = AFAmazonS3USWest1Region;
s3Client.bucket = @"my-bucket-name";

[s3Client postObjectWithFile:@"/path/to/file"
             destinationPath:@"https://s3.amazonaws.com/example"
                  parameters:nil
                    progress:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
                        NSLog(@"%f%% Uploaded", (totalBytesWritten / (totalBytesExpectedToWrite * 1.0f) * 100));
}
                     success:^(id responseObject) {
                        NSLog(@"Upload Complete");
}
                     failure:^(NSError *error) {
                         NSLog(@"Error: %@", error);
}];

Contact

Mattt Thompson

License

AFAmazonS3Client is available under the MIT license. See the LICENSE file for more info.