Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition
hea
We had a similar problem in a web application, and ended up by reading the filename from the HTML , and setting that in the url-encoded form in a new HTML
. Of course we had to remove the path like "C:\fakepath\" that is returned by some browsers.
Of course this does not directly answer OPs question, but may be a solution for others.