0

Does anyone have any idea how can I save/upload a photo from iphone application via http?

Thanks

Leo
  • 1,547
  • 3
  • 24
  • 40
  • That depends on the service you are uploading to. Where do you want to upload the photo? – zoul Jun 11 '10 at 13:58
  • I am using .net webservice. What I would like to do when user select a photo in iphone application and hit submit I want to upload this photo via http to the hard drive where web service is running. – Leo Jun 11 '10 at 14:01

1 Answers1

0

Through the SDK available, you'd need to go through the UIImagePicker control to select a photo, convert it to NSData, apply the appropriate encoding and the perform the HTTP post.

Here's a code snipper showing how to use the UIImagePicker control:

http://www.ikangai.com/blog/development/code-snippet-of-the-week-uiimagepicker

Mark Mayo
  • 12,230
  • 12
  • 54
  • 85
  • Also have a read of: http://stackoverflow.com/questions/128378/upload-photo-to-arbitrary-ftp-with-iphone-app and http://stackoverflow.com/questions/2482082/iphoneupload-photo-to-flickr – Mark Mayo Jun 11 '10 at 14:58