in reply to Re^3: Perl CGI download file and redirect
in thread Perl CGI download file and redirect
I'm reffering from a script (let's call it main.pl) printing:
My download.pl is what I posted on my first post:<html> <head> <title>Redirect</title> <meta http-equiv="refresh" content="0; URL=download.pl?filename=$f +ilename"> </head> </html>
So I'm going to call main.pl -> redirecting to download.pl and now I want to redirect from download.pl to justanotherscript.pl. But when redirecting to justanotherscript.pl I need to get the file download on the same step.use strict; use warnings; use CGI; my $oCGI = new CGI; my $p_filename= $oCGI->param("filename"); print "Content-Type: application/x-download\n"; print "Content-Disposition: attachment; filename=$p_filename.pdf\n\n"; unlink $p_filename;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl CGI download file and redirect
by Corion (Patriarch) on Nov 17, 2014 at 14:50 UTC | |
by Yaerox (Scribe) on Nov 17, 2014 at 14:58 UTC | |
by Corion (Patriarch) on Nov 17, 2014 at 17:39 UTC | |
by Yaerox (Scribe) on Nov 20, 2014 at 07:21 UTC |