Read RFC 2183
You can also pre-set the saved filename by setting the filename parameter as well.
Be sure to set the appropriate MIME type or content type as well.
Below is a code example of how this would be achieved in a java servlet before committing the response.
response.setContentType( "application/pdf" );
response.setHeader("Content-disposition","attachment; filename=" + "Example.pdf" );
Hope this helps, if it does, help me out by clicking on one of my sponsors.
Sick java script, bro.
ReplyDelete