Re: File Uploading to HTTP server using CFHTTPMessage API fails
Re: File Uploading to HTTP server using CFHTTPMessage API fails
- Subject: Re: File Uploading to HTTP server using CFHTTPMessage API fails
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Fri, 13 Jan 2012 13:56:15 +0000
On 13 Jan 2012, at 05:55, Jens Alfke wrote:
> [lots of good advice]
>
> If you do need to handle huge files and don’t want to copy the file, you could create your own NSInputStream subclass that when read first returns the XML data, and then opens a private input stream on the file and returns data from that.
This is the right idea, but you can't implement it as an NSInputStream subclass because there's no supported way to implemented an NSInputStream subclass that runs asynchronously. Instead we recommend you use a stream pair, as shown by the POST code in the SimpleURLConnections sample code.
<http://developer.apple.com/library/ios/#samplecode/SimpleURLConnections/>
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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