Fixing file upload to match 0.7 API (Thanks, @Hunter)
This commit is contained in:
parent
b811dc1e94
commit
73e1137649
1 changed files with 1 additions and 4 deletions
|
|
@ -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);
|
||||
}];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue