Perfect. I was reading about things like subclassing NSInputStream and having to implement methods for which no docs were available on what to implement and things like that. It sounds like its a lot simpler and so that's good. Will do!

On Jun 29, 2008, at 8:53 AM, Jens Alfke wrote:


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

Alex Kac - President and Founder
Web Information Solutions, Inc. - Central Texas Microsoft Certified Partner

"It is useless for sheep to pass a resolution in favor of vegetarianism while wolves remain of a different opinion."
-- William Randolph Inge




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to