Skip to content

Instantly share code, notes, and snippets.

@ethanbing
Created April 2, 2014 02:30
Show Gist options
  • Save ethanbing/9927019 to your computer and use it in GitHub Desktop.
Save ethanbing/9927019 to your computer and use it in GitHub Desktop.
AFNetwork上传图片
AFHTTPRequestOperation * operation = [_AFManager POST:[_baseURL stringByAppendingString:MCSetavatarInterface] parameters:dic constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
[formData appendPartWithFileURL:[dic objectForKey:@"url"] name:@"avatar" error:nil];
} success:^(AFHTTPRequestOperation *operation, id responseObject) {
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment