Looking at using either ObjectiveResource or ASIHTTPRequest …
-
Which is superior for uploading images? Or is there a better option???
-
Are there any examples of using either or both to upload images (or any other binary content)?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I haven’t used ObjectiveResource. ASIHTTPRequest is fairly easy to use. You’ll probably need multipart/form-data request, so there is a ASIFormDataRequest subclass for that.
I had some problems with ASIFormDataRequest and Rails though. From what I remember, images in request were accompanied by “charset=some-encoding” parameter (and it was hardcoded), so Rails wouldn’t accept it as a valid image when charset=utf8 was there. Another problem was, you couldn’t have arrays (like array_item[]) in your POST requests. You simply couldn’t add more than one parameter with the same name. But both problems are pretty easy to patch if you really want to use ASI framework.
Take a look at http://allseeing-i.com/ASIHTTPRequest/How-to-use and at the comments in ASIFormDataRequest.h