I tried to download the image using AFNetworking3.0. I tried to find how to load an image from all stackoverflow and tutorials, but all of them relate to AFNetworking2.0 and below. The focus is on the fact that I'm going to upload an image to a website.
Once the image is uploaded, the URL of the image must exist on the website.
Please see the code below.
AFHTTPRequestOperationManager *requestManager; [requestManager POST:KAPIUploadOutfit parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) { [formData appendPartWithFileURL:fileURL name:@"photo_url" fileName:filename mimeType:@"image/png" error:nil]; } success:^(AFHTTPRequestOperation *operation, id responseObject) { successCB(responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { errorCB(CONNECTION_ERROR); }];
I'm not sure what this parameter is. Please tell me how to do this.
source share