in reply to Re: saving data locally in CGI script?
in thread saving data locally in CGI script?

Thanks! Your idea made this even more compact:

my $cgi = CGI->new(); my $s = "Hi, Mom!\n"; print $cgi->header(-type => 'text/csv', -attachment => 'filename.c +sv', -Content-length => length($s)); print $s;

Is it possible to generate the standard file-open dialog such that the filename can be changed?

Replies are listed 'Best First'.
Re^3: saving data locally in CGI script?
by ikegami (Patriarch) on Jan 22, 2010 at 23:22 UTC

    To pick the name of the file to which to save? Your browser should do that already.

      Correct. The browser prompts to save the file using the (default) filename supplied by the server. Yet the standard file-open dialog (which is different than the one used here...) will allow the user to rename the file. How can I get this functionality?

      Thanks.

        You have a weird browser. I get a std dialog with FF and IE

        Or maybe you have your browser set not to ask you?