• 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: NSURLConnection vs CF and other ideas
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSURLConnection vs CF and other ideas
      • From: Alex Kac <email@hidden>
References: 
 >NSURLConnection vs CF and other ideas (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: XML-RPC Cocoa Parsing
  • Next by Date: Re: NSURLConnection vs CF and other ideas
  • Previous by thread: Re: NSURLConnection vs CF and other ideas
  • Next by thread: Re: NSURLConnection vs CF and other ideas
  • Index(es):
    • Date
    • Thread