Manage a Download

Dave Cragg dcragg at lacscentre.co.uk
Thu Feb 6 06:42:01 EST 2003


At 11:56 am -0800 5/2/03, Scott Rossi wrote:
>How can one pause and resume a file download?
>
>For example:
>
>put "http://www.server.com/special_file.jpg" into tFile
>put url ("binfile:" & tFile) into url MyDrive/Folder/MyJpeg.jpg
>
>I understand you need to keep track of what's been downloaded, but how do
>you pick up from where you left off?

Vikram mentioned the powerful and scary libUrlFtpCommand function as 
a possible way to manage this.

On the http side of things, you should be able to do this by 
including a "Range" header in the equally powerful and scary 
httpHeaders property. You will need to know how to construct that 
header, and probably how to interpret the headers in the server's 
response (libUrlLastRHHeaders function). rfc 2616 has the details 
(strong coffee recommended before reading).

<http://www.w3.org/Protocols/rfc2616/rfc2616.html>

Alternatively, keep your sanity and just download the whole file 
again. How big is this jpg anyway? :)

Good luck!

Dave



More information about the metacard mailing list