JohnB has asked for the wisdom of the Perl Monks concerning the following question:
When uploading files with the CGI.PM module how do I specify the default file extension when the user clicks on the browse button. I am using ActivePerl on Windows 98 with a Netscape browser.
This code will produce a file upload field on a form with a browse button:
print start_multipart_form, filefield(-name=>'upload',-size=>60),br, submit(-label=>'Upload File'), end_form;
When the user clicks on the browse button a file upload window opens with the default file extension set to HTML. I would like to change the default file extension to something else.
I couldn't find the answer in Lincoln Stein's book on CGI programming and I also tried using super search.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Set File Upload Extension With CGI.PM
by chromatic (Archbishop) on Mar 23, 2001 at 00:42 UTC |