Re: NSURLConnection vs CF and other ideas
Re: NSURLConnection vs CF and other ideas
- Subject: Re: NSURLConnection vs CF and other ideas
- From: Jens Alfke <email@hidden>
- Date: Sun, 29 Jun 2008 06:53:58 -0700
On 28 Jun '08, at 6:11 PM, Alex Kac wrote:
I've got a working HTTP Post with file upload using NSURLConnection,
but I don't seem to see any ways to get progress on the upload
beyond the connectionDidFinishLoading: delegate. Is there a better
way to be able to get progress info so we can display that to the
user?
Set the body of the request to an NSInputStream on the file. (This is
a good idea anyway because it avoids having to load the entire file
into memory.) Then you can periodically access the stream's
NSStreamFileCurrentOffsetKey property (i.e. from a timer) to find out
how much of the file has been read.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden