in reply to Download File using CGI
You need a HTML link pointing to a cgi:
And then in the download.cgi only do the header and file-content:<a href="download.cgi?file=something">download here</a>
print <<ENDH; Content-type: application/octet-stream Content-Disposition: attachment; filename: $updated ENDH open FILE,"< /my/file" or die "Can't open: $!"; binmode FILE; local $/ = \10240; while (<FILE>) { print $_; } close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Download File using CGI
by MonkPaul (Friar) on Jun 01, 2005 at 15:26 UTC | |
by Joost (Canon) on Jun 01, 2005 at 15:36 UTC | |
by Anonymous Monk on Jun 02, 2005 at 07:46 UTC | |
by MonkPaul (Friar) on Jun 03, 2005 at 09:06 UTC |