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
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
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