• 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: File size of a downloadable file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File size of a downloadable file


  • Subject: Re: File size of a downloadable file
  • From: Gwynne <email@hidden>
  • Date: Sat, 17 Apr 2004 14:28:00 -0400

On Apr 17, 2004, at 2:17 PM, Ondra Cada wrote:
Does anyone know how you might be able to programmatically get the
size of a file you are going to download before you start downloading?
Download *how*? With FTP, you can ask for the file size explicitly
before you begin downloading; with HTTP I regret to say I don't know
the trick, but it is possible too somehow (it would probably be part of
the HTTP header, I guess).

Neither is reliable; the FTP SIZE command is not implemented on all servers, and the HTTP HEAD request (from which you'd parse the Content-length: header) is also not 100% supported AFAIK. YMMV.

-- Gwynne, key to the Code that runs us all
Formerly known as Sailor Quasar.
Email: email@hidden
Web: http://musicimage.plasticchicken.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >File size of a downloadable file (From: Pat Homelvig <email@hidden>)
 >Re: File size of a downloadable file (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: OBJ-C question
  • Next by Date: Re: OBJ-C question
  • Previous by thread: Re: File size of a downloadable file
  • Next by thread: Re: File size of a downloadable file
  • Index(es):
    • Date
    • Thread