Afnetworking 2.0 PUT image
-
I can use put afnetworking 2.0 method to put data.
NSString * PUTURL = [NSString stringWithFormat: @ "% @ / updateestado / Estado /% @ / idJugador /% l.d.", BaseUrl, [urlEncodeUsingEncoding status: NSUTF8StringEncoding], user ID];
NSLog (@ "REG URL ----% @", PUTURL);
AFHTTPRequestOperationManager * manager = [AFHTTPRequestOperationManager manager]; [PUT manager: PUTURL parameters: nil success: ^ (AFHTTPRequestOperation operation *, id responseObject) {NSLog (@ "JSON:% @", responseObject); [self.NET_Delegate DelegateUpdateStatusResponce: responseObject];
}: ^ (AFHTTPRequestOperation *, NSError * error) {[self.NET_Delegate DelegateUpdateStatusError: error]; }];
- I can upload video successfully using post method.
- But the requirement for uploading the image is using PUT
- I followed the method outlined in Simple "PUT" file upload using AFNetworking but there were two issues: multipartFormRequestWithMethod disabled & when trying to access 404 error.
-
There are no links for this on the afnetworking doc on github.
-
Request: I am working on loading an image using the first time, so I think I am missing something. Any examples of links or code for this would be helpful. Thanks to
source to share
You are not uploading an image; but rather the url of the image (note the parameter url
).
Therefore, you will need to upload the image to a third party site and then submit a link to any service.
There is no way to upload an image using a PUT request so you might be missing something.
source to share