Script to download LARGE files
From: Russell Glasser (rglasser_at_apollowebworks.com)
Date: 01/30/04
- Next message: Ben Morrow: "Re: use of stat and argument isn't numeric message"
- Previous message: Jay Tilton: "Re: finite element code"
- Next in thread: Ben Morrow: "Re: Script to download LARGE files"
- Reply: Ben Morrow: "Re: Script to download LARGE files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Next message: Ben Morrow: "Re: use of stat and argument isn't numeric message"
- Previous message: Jay Tilton: "Re: finite element code"
- Next in thread: Ben Morrow: "Re: Script to download LARGE files"
- Reply: Ben Morrow: "Re: Script to download LARGE files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|