sbhalgat has asked for the wisdom of the Perl Monks concerning the following question:
my $file = "$file_name"; if (-e $file) { local *FH; open FH, $file or die "Unable to open file"; if (-B $file){ binmode FH; } $r->content_type('application/octet-stream'); $r->set_content_length(-s FH); $r->headers_out->add("Content-Disposition" => qq(attachment; filename= +"$display_filename")); my $buffer; $m->autoflush(1); while (sysread(FH, $buffer, 262144)) { $m->out($buffer); } $m->autoflush(0); close FH; return;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting problem while downloading large file(1.9GB)
by CountZero (Bishop) on Jan 16, 2012 at 06:49 UTC | |
by sbhalgat (Initiate) on Jan 16, 2012 at 08:22 UTC | |
by CountZero (Bishop) on Jan 16, 2012 at 11:14 UTC | |
by Anonymous Monk on Jan 16, 2012 at 12:02 UTC | |
by CountZero (Bishop) on Jan 16, 2012 at 13:30 UTC | |
| |
by Anonymous Monk on Jan 16, 2012 at 10:52 UTC | |
|
Re: Getting problem while downloading large file(1.9GB)
by Anonymous Monk on Jan 16, 2012 at 07:01 UTC | |
|
Re: Getting problem while downloading large file(1.9GB)
by pvaldes (Chaplain) on Jan 16, 2012 at 14:25 UTC |