um3814
asked on
how to set the filename for data that is sent to the browser for downloading
I use a perl cgi script to limit access to files to authorized users only. I send the files with content-type application/octet-stream so that they will be offered for saving to disk. Unfortunately the filename that the browser is proposing is derived from the cgi scriptname. How can I set that filename in the cgi script ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
( incl. extension) and the extension will confuse the browser.
The content-type is not always the main criteria.
From all you said I learned , that the key point is to make the browser send an URL with the name of the file.