Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Resume failed file transfer

by arthas (Hermit)
on Jul 19, 2003 at 12:28 UTC ( #275861=note: print w/replies, xml ) Need Help??


in reply to Resume failed file transfer

Hi!

Is FTP is the protocol, use Net::FTP. You can resume a file transfer from where is was interrupted by using the following syntax:

$result = $ftp->get($remotefile, $localfile, $offset);

In $offset you can specify the position from where the transfer should start. For HTTP, you can use LWP this way:

$request->header('Range' => "bytes=$local_size-$remote_size");

This should be added as an header to the request for the file.

Hope this helps!

Michele.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://275861]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2019-05-26 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (152 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!