Skip to content
This repository

AFNetworking Client for the Amazon S3 API

tag: 0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

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:)

Caution: This code is still in its early stages of development, so exercise caution when incorporating this into production code.

Example Usage

AFAmazonS3Client *s3Client = [[AFAmazonS3Client alloc] initWithAccessKeyID:@"..." secret:@"..."];
    s3Client.bucket = @"my-bucket-name";
    [s3Client postObjectWithFile:@"/path/to/file" parameters:nil progress:^(NSInteger 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.

Something went wrong with that request. Please try again.