Is there a way to serve content via a .cfm file and if the user right
clicks and chooses "Save As" it would save the file as the filename
attribute and not the name of the CF file serving the content?
For example..
serve.cfm
<cfheader name="Content-Disposition" value="inline;
filename=#article.filename#">
<cfcontent type="#article.mime_type#" file="#article.link#" />
If you click Save As it want's to save it as "serve.cfm.htm"
But I'd like it to save as "#article.filename#"
I can create a separate cfheader and use
<cfheader name="Content-Disposition" value="attachment;
filename=#article.filename#">
It pops up the Save As prompt.. I suppose I can go down this route but
I'm sure the users would rather just save PDFs from the viewing page
and not having to hit back and then a separate link for downloading
the article..
Anyone have other ideas?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344916
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm