Script to download LARGE files

From: Russell Glasser (rglasser_at_apollowebworks.com)
Date: 01/30/04


Date: 29 Jan 2004 15:54:31 -0800

Hello,

I'm have a script that downloads files from a web server. The user
goes through a web browser based "file explorer" type interface to
view which files are available, and then clicks on a file to download.

In simplified form, the download script looks something like this:
(retyping the relevant section only, so don't be surprised if it fails
to compile)

    open OUTFILE, $filename or die;
    print "Content-Dispsition: attachment; filename=\"$filename\"\n";
    print "Content-type: download\n\n";
    while (<OUTFILE>) {
        print $_;
    }
    close OUTFILE;

This actually works well enough in most cases, but recently we had a
client attempt to download a BIG file. Like, 300 megabytes or so.
The browser died without giving the file over, and the web error log
said "Out of memory!"

Is it even possible to do this? Am I handling downloads wrong, do you
think?



Relevant Pages

  • RE: WWW::Mechanize, save images from a page
    ... I just copied your script, and added a get on the image link. ... Then download the image. ... print "url to image is: http://$host$img_link\n";; # view that url in a web browser and/or ...
    (perl.beginners)
  • Re: constant runtime errors-please help
    ... Common script errors messages can be eliminated by Clicking: ... click Internet Options. ... Two download versions are available for Windows Script 5.6. ... HiJackThis: - Free ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Idiot proof removal of junk?
    ... | I would like to send everyone a single script or small set of scripts ... | convince windows to boot into safe mode with command prompt. ... FireWall to allow it to download the needed AV vendor related files. ... This will bring up the initial menu of choices and should be executed in Normal Mode. ...
    (microsoft.public.windowsxp.help_and_support)
  • Announcement: Fix management tool for AIX 4.x/5.x available
    ... I'm pleased to announce a tool to automate download and management ... of ".bff" and ".rpm" fix packages for AIX ver. ... "fix-get.sh" script has been designed to automate fix packages ... discovery and download for servers with Unix AIX versions up to 5.3. ...
    (comp.unix.aix)
  • Re: Operations Masters
    ... Run diagnostics against your Active Directory domain. ... Run dcdiag, netdiag and repadmin in verbose mode. ... If you download a gui script I wrote it should be simple to set and run ...
    (microsoft.public.windows.server.active_directory)