Re: File size of a downloadable file
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.