patair has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I have a cgi script which creates a file which I want the user to be able to download after script is complete (similar to when we click download link on any website it says where to save the file).

any ideas how to to link to the recently created file to a button on the resultant web page?

thanks in advance

Regards

Pat

  • Comment on perl cgi script --> File --> save as button?

Replies are listed 'Best First'.
Re: perl cgi script --> File --> save as button?
by jethro (Monsignor) on Feb 08, 2011 at 16:52 UTC

    See thread 884248 where a similar question was asked. Basically you store that file somewhere where the webserver can reach it and put a link to that on the resultant web page. That's it

Re: perl cgi script --> File --> save as button?
by Your Mother (Archbishop) on Feb 08, 2011 at 17:27 UTC

    Probably you want something from these - download "content disposition" perl. You just have the button click be a parameter that triggers serving the proper page (with the content-disposition header).