Re: cfcontent changing name of file
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
Re: cfcontent changing name of file
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 Well, if the file name is classroom.pdf, it must be because you have handout set to classroom.pdf, no? ~| 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:353719 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent changing name of file
Hi Claude No classroom.cfm is the file that serves up the handouts. person clicks on a link: classroom.cfm?handout=session1.pdf classroom.cfm has cfheader name=Content-disposition value=inline;filename=#handout# / cfcontent type=application/pdf file=#handoutfile# deleteFile = no / handoutfile is the full path and file name This displays the file fine in the browser, but attempts to save it using the browser pdf save function will try to save it as classroom.pdf Interesting I just discovered that if I use the browsers save file it is saving it as session1.pdf My issue is with the browser's pdf reader save function. This is true for firefox and safari Rob On 30 Dec 2012 at 8:55, =?ISO-8859-1?Q?Claude_Schn=E9 wrote: 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 Well, if the file name is classroom.pdf, it must be because you have handout set to classroom.pdf, no? ~| 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:353720 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Spammers are stupid
So since occasional messages from this list and random legitimate emails from other sources somehow end up in my spam folder, I actually have to look at the folder contents. As I was moving legitimate messages out, I came across an ad about BBW dating. Funny thing was, the girl in the picture was anything but BBW. Very much in shape actually. I wonder if the idiot who actually took the time to create the graphic actually knows what a BBW is. Spammers make me laugh, and after being up for over 24 hours because I had duty yesterday, I needed a good laugh. Happy New Year Bruce ~| 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:353721 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent changing name of file
Well, I see. Then it definitely looks like a Firefox issue. Have you try with Explorer? I don't see what you can do from CF. ~| 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:353722 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent changing name of file
Hi Claude It appears on all browsers. i think the issue is in the adobe pdf reader, not picking up the file name. it seems to fall under the rubric. Just when I thought I had idiot proofed the system they invented a more advanced idiot. My solution for now, or what I am prepared to put time into is to create a view link and a download link. Thanks Rob On 30 Dec 2012 at 11:18, =?ISO-8859-1?Q?Claude_Schn=E9 wrote: Well, I see. Then it definitely looks like a Firefox issue. Have you try with Explorer? I don't see what you can do from CF. ~| 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:353723 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm