Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this .</p> <p><a href="https://stackoverflow.com/questions/1166549/how-to-upload-an-image-in-iphone-application">How to upload an image in iPhone application</a></p> <p>and this </p> <p><a href="https://stackoverflow.com/questions/125306/how-can-i-upload-a-photo-to-a-server-with-the-iphone">How can I upload a photo to a server with the iPhone?</a></p> <p>EDIT:</p> <pre><code>NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url]; [urlRequest setHTTPMethod:@"POST"]; [urlRequest setValue: [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundry] forHTTPHeaderField:@"Content-Type"]; NSMutableData *postData = [NSMutableData dataWithCapacity:[data length] + 512]; [postData appendData: [[NSString stringWithFormat:@"--%@\r\n", boundry] dataUsingEncoding:NSUTF8StringEncoding]]; [postData appendData: [[NSString stringWithFormat: @"Content-Disposition: form-data; name=\"%@\"; filename=\"file.bin\"\r\n\r\n", FORM_FLE_INPUT] dataUsingEncoding:NSUTF8StringEncoding]]; [postData appendData:data]; [postData appendData: [[NSString stringWithFormat:@"\r\n--%@--\r\n", boundry] dataUsingEncoding:NSUTF8StringEncoding]]; [urlRequest setHTTPBody:postData]; </code></pre> <p>Also check out the video : <a href="http://www.youtube.com/watch?v=aQXaJO36I7Y" rel="nofollow noreferrer">http://www.youtube.com/watch?v=aQXaJO36I7Y</a></p> <p>The kid is explaining the things pretty easily .you can do the thing with that video .</p> <p>You will also need a php script to parse the image at server side .</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload