How to submit photo via http from iphone application - iphone

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

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

Related

Get an image from photo library and upload it to web service by name and path

I am creating a web service based iphone application in which a certain place i need to post an image on to the web for which i want to select image from photo gallery of phone and then i need to get the name and the path of the image on textfield and then uploading of the image.
or when pressing the browse button image picker will show all the image of the iphone and by selecting image it will return its path and name by which we can upload it.
Please check the similar question first.
To fully understand the answer you should also need to read UIImagePickerController Class Reference and ASIHTTPRequest documentation
As ASIHTTPRequest library is not supported more by its author, you may use another open source solution - AFNetworking or even the Cocoa classes, described in the URL Loading System Programming Guide

Adding photo upload to an iPhone App that's mostly HTML5/JS

I'm working on an iPhone App that's HTML5/JS displayed in a single UI Webview. I'd like to add photo upload capabilities, and I'm wondering what the best approach would be to extend the iPhone app with the necessary classes to pick a photo and upload via an API. I'd also like to trigger the display of the photo picker via JS if that's possible.
I know it's possible to use a framework like PhoneGap to do this, but I don't want to migrate the whole app to a new framework yet. Also, sorry for the "how to" type question - I normally ask about specific problems after I've exhausted my efforts, but I'm pretty new to Objective C, so I'd appreciate some guidance, even if it's just a simple design explanation.
the image picker (UIImagePicker) is fairly straightforward to work with: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html
and for an API, are you sending it to an existing system? or creating your own. You just need to craft an NSMutableURLRequest with POSTED data in a multi-part format, and then handle the image portion appropriately in your server.
this might help: upload image from iPhone application

Sending the iphone camera captured images to the web service and getting response?

Hey guys I was wondering if anyone had some sample code for enabling the camera for the iphone. I want to be able to Send the captured image to webservice.
Use UIImagePickerController and its delegate method will help you to get the image from camera which you can use.
Reference
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html
Pls refer this also
How to send images to a web service?

Is there a way to capture a picture by the iPhone via Browser?

Can i capture Pictures via Browser with the iPhone?
Or what is the easyest way? which API?
Thanks for answers!
Sorry, but this isn't currently possible (as of iOS v4.2) - the only way to currently interact with the camera, etc. is via a full-blown iOS app.
The only additional capabilities that are provided beyond a "normal" browser are JavaScript events to capture touch related actions.

Saving images inside iPhone application without using database or server side saving technique

I am developing an application which requires saving images in the "saved folder" of iPhone Photo album after performing some animations on ImageViews. Is it possible to save the incomplete images temporarily in the iphone application without using database or server side saving technique, so that user can use it for future use and only completely changed ones should get saved in Photo Album? If yes then it would be a great help to get any code or suggestion.
Thanks in advance :) !!!!
Sure, images can be converted to NSData objects, which can then be written to a standard file. Check out UIImagePNGRepresentation() and -[NSData writeToFile:atomically:].
You can then save to the standard native Photo album application using the technique described here (from a UIImage instance):
How to save picture to iPhone photo library?