Iphone Upload File source code objective c
what is equivalent iphone (objective c) code to
<form met开发者_如何学JAVAhod="post" enctype="multipart/form-data" action="page2.php">
<input type="file" name="File">
<input type="submit" name="uploadbtn">
</form>
i want to upload file from iphone to server.
You will need to POST from your device to your server.
You can use the ASIHTTPRequest library to do this or use the built in NSURLConnection class.
Look specifically at the "Sending a form POST with ASIFormDataRequest" section in the ASIHTTPRequest documentation.
If you can't use a third party library you will have to use NSURLConnection. You can find examples of how to use NSURLConnection here: File Upload to HTTP server in iphone programming
精彩评论