Railo cfdocument saveAsName has no effect

634 views Asked by At

I've created a reporting application on Railo. The last step of this is to allow the users to download their reports. For this, they click on a link which takes them to /download.cfm?report=reportid

The download page is just

<cfdocument format="pdf" saveAsName="Report.pdf">
<!-- html for report here -->
</cfdocument>

This should be ideally showing a save file dialog with "Report.pdf" in the default file name. However, it still shows "download.cfm"

Any idea what I am overlooking / how to make the save file dialog show "Report.pdf"?

1

There are 1 answers

6
Jake Feasel On BEST ANSWER

Try manually setting the content disposition header:

<cfheader name="content-disposition" value="attachment; filename=Report.pdf">