From: Jamie C. <jca...@we...> - 2003-01-16 01:28:09
|
Thomas P. Jones wrote: > Hi, > > I'm writing a module that's creating a file for downloading > by the user. I'm using a script that creates a > MIME content-type header so the browser opens > a "Save As.." dialog box. This works fine. > > One issue though: the filename that gets filled into the > dialog box by default is the name of the script, eg "archive.cgi". > > Also the file types the browser looks for is: *.cgi > > My questions are: > 1) how does one provide an alternative name to appear > in this browser dialogue eg "my-archive-file.xfg" ? > 2) how does one make the browser look for *.xfg ? The trick I use is to have the form or link point to something like /modulename/archive.cgi/my-archive-file.xfg Webmin will still execute archive.cgi (and pass /my-archive-file.xfg to it in $ENV{'PATH_INFO'}) but the browser will offer to save as my-archive-file.xfg - Jamie |