• 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
streaming upload of a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

streaming upload of a file


  • Subject: streaming upload of a file
  • From: "Tracy Stampfli" <email@hidden>
  • Date: Wed, 22 Jun 2005 11:02:47 -0700
  • Thread-topic: streaming upload of a file

I am using CFNetwork to upload files using HTTP POST multipart/form-data requests. This works fine for small files, but I would like to be able to upload larger files without having to read the entire file into memory in order to create the body of the request. 
 
Currently, since the body of my request has to include both the file data and the form data (boundary strings, etc.). I create a buffer, fill it with the form elements and file data, call CFReadStreamCreateWithBytesNoCopy to get a stream from the buffer, and then call CFReadStreamCreateForStreamedHTTPRequest to make my request. 
 
What I would like to do is get a stream to the file (with CFReadStreamCreateWithFile, presumably) and create the request from that stream, without reading the file into memory. The problem is that if the file stream is used as the body of the request, I can't include other any data in the body, like the form elements. Is there any way to stream in the file as part of the body of the request, but still add other data?
 
 
-Tracy

 

 

 _______________________________________________
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: streaming upload of a file
      • From: Becky Willrich <email@hidden>
  • Prev by Date: Re: SystemConfiguration framework and Carbon CFM - continued
  • Next by Date: Re: streaming upload of a file
  • Previous by thread: WG: AW: PPP_PATH
  • Next by thread: Re: streaming upload of a file
  • Index(es):
    • Date
    • Thread