sub fetch_archive { my $path = "path/to/file/"; my $filename = "data.zip"; my $zip = Archive::Zip->new(); $zip->addTree( $path, '' ); print "Content-type: text/plain\n" . "Content-Disposition: attachment;$filename\n\n". $zip->writeToFileHandle( 'STDOUT', 0 ); return Apache::OK; }
In reply to Sending a file through STDOUT using HTTP by hcubed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |