How can I upload an image to server from imagePickerController with AFNetworking? I tried this:
NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:urlString parameters:params constructingBodyWithBlock:^(id <AFMultipartFormData> formData) {
[formData appendPartWithFileData:photo.data name:@"photo" fileName:@"photo.jpg" mimeType:@"image/jpeg"];
}];
but from where i must to get name and fileName ?
If someone could help me please.
Thanks.