Right now I have that in my controller, which is probably not the right place for it? I could create a view and put it in there, but I don’t like going around the framework with my own cfheader & cfcontent tags. I was thinking I should be able to just handle this all with RenderData()? But I can’t get it to work. This throws an error:
Thanks, that helped. Sorry no I did not find the API docs, I googled, found the wiki, looked all over the wiki, searched the wiki, but didn’t see the isBinary attribute.
Unfortunately this still won’t work for me because the file is downloaded as “index.pdf”. I would like to suggest a future enhancement of being able to specify the Content-Disposition.
You can browse or download HTML javadoc style docs, or my favorite is to click the “quickdocs” link and use the search in the upper right hand corner. For instance, type “renderData” and click the result that is part of the requestContext and you’ll see all the parameters.
Of course, since that data is pulled straight from the source, I’ll often times just open the file from the Coldbox.system folder and look at the code
Regarding your content-disposition, can you set that header manually for now before calling render data?
Brad thanks for the tips. And that is a good idea to manually set the Content-Disposition header and then use RenderData() afterwards, I will use it. I still think it would be nice to be able to say: