• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Uploading files to http server
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uploading files to http server


  • Subject: Re: Uploading files to http server
  • From: Becky Willrich <email@hidden>
  • Date: Mon, 26 Jun 2006 10:12:25 -0700

This is typically done with a POST or PUT HTTP request; the server needs to be configured to handle the request, and the server determines which kind of request is needed.

On the client side, you can either use NSURLRequest + NSURLConnection or CFHTTPMessage + CFHTTPStream to get the work done, depending on which library you'd rather work with and what features you need. The NS classes require Objective-C and provide caching, automatic proxy configuration, and authentication support. The CF pieces have no Objective-C dependency and require some extra code to get proxies and authentication working. In either case, you just need to set the request's method to POST (or PUT, depending on the server), and then supply the data to be uploaded. The uploaded data can be specified either as data in memory or as a stream to be opened and read as the POST is transmitted.

Hope that helps,
REW


On Jun 26, 2006, at 10:04 AM, Mark Thomas wrote:

Hi,
Does anybody know, how you would go about uploading files to a http server
programmatically. I understand via html page marking an input field as type
file, which is POST'ed via the action field.


I understand that all this does it load the file contents and then sets
this for the data of the field in the POST request - I think, does this
sound right or am I missing something more basic here. Are there also any
API's which do this as I see the basic ones, but nothing which is file based
I think.


I need to do this as I need to upload a firmware file to router which is
running a http server to receive the file and then apply it.


Thanks for any help and guidance.

Thanks
Mark.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Uploading files to http server
      • From: Mark Thomas <email@hidden>
    • Re: Uploading files to http server
      • From: Mark Thomas <email@hidden>
References: 
 >Uploading files to http server (From: Mark Thomas <email@hidden>)

  • Prev by Date: Uploading files to http server
  • Next by Date: Re: Uploading files to http server
  • Previous by thread: Uploading files to http server
  • Next by thread: Re: Uploading files to http server
  • Index(es):
    • Date
    • Thread