0

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.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user298261
  • 422
  • 3
  • 17

1 Answers1

1

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

Community
  • 1
  • 1
Anne
  • 26,765
  • 9
  • 65
  • 71