On 30 Dec 2012 at 1:05, =?ISO-8859-1?Q?Claude_Schn=E9 wrote:
Hi Claude
The "attachment" option forces a download without viewing, I want the user to 
be able to view the document and then save it if they choose.
So far there are two options that I can use in the serving page classroom.cfm:

<cfheader name="Content-disposition" value="inline;filename=#handout#" />
<cfcontent  type="application/pdf"  file="#handoutfile#" deleteFile = "no" />

This works great for viewing the file, but the name of the file is 
"classroom.pdf" 
since there is multiple handouts the user is likely to overwrite previously 
saved 
files

<cfheader name="Content-Disposition" 
value="attachment;filename=#handout#">
<cfcontent type = "application/pdf" file="#handoutFile#" DELETEFILE="no" />
 
This works great for forcing the download with a changed name but doesn't have 
the view option.

Seems the simplest route is to create two links. "View Handout" and "Download 
Handout"

Thanks

Rob



> 
> You need two tags: one to set the file name, one to send return the
> document
> <cfheader name="Content-Disposition" value="attachment;
> filename=myFile.pdf">
> <cfcontent type = "application/pdf" file="#handoutFile#"
> DELETEFILE="no" RESET="yes">



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:353718
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to