user298261
user298261

Reputation: 412

iPhone taking a picture and posting it to a database

I'm currently adding some photo-taking functionality to my application.

I'm curious about something, though. After the photo is taken, this code holds it as a piece of data:

NSData *imageData = UIImagePNGRepresentation(saveImage);

What I need to know is how the picture, after taken by the user, would get sent to the web via a PHP script. The script has been written, but on the iPhone end, what would I have to do programatically to ensure it gets sent to the database in the right format for viewing? I have the "POST" NSURL request setup, which I've used many times for posting strings/numbers, but I don't know if this is different for photo data.

Upvotes: 0

Views: 643

Answers (1)

Anne
Anne

Reputation: 27073

Open Google, search for 'cocoa upload photo iphone', see first result:
How can I upload a photo to a server with the iPhone?

Upvotes: 1

Related Questions