Skip to content

Commit

Permalink
Fixing file upload to match 0.7 API (Thanks, @hunter)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Oct 13, 2011
1 parent b811dc1 commit 73e1137
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ NSMutableURLRequest *request = [[AFHTTPClient sharedClient] multipartFormRequest
[formData appendPartWithFileData:data mimeType:@"image/jpeg" name:@"avatar"];
}];

AFHTTPRequestOperation *operation = [AFHTTPRequestOperation operationWithRequest:request completion:^(NSURLRequest *request, NSHTTPURLResponse *response, NSData *data, NSError *error) {
NSLog(@"Upload Complete");
}];

AFHTTPRequestOperation *operation = [[[AFHTTPRequestOperation alloc] initWithRequest:request] autorelease];
[operation setUploadProgressBlock:^(NSUInteger totalBytesWritten, NSUInteger totalBytesExpectedToWrite) {
NSLog(@"Sent %d of %d bytes", totalBytesWritten, totalBytesExpectedToWrite);
}];
Expand Down

0 comments on commit 73e1137

Please sign in to comment.