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
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
Re: cfcontent changing name of file
try this. http://www.sitepoint.com/forums/showthread.php?640127-changing-filename-of-download-in-cfcontent On Sun, Dec 30, 2012 at 1:50 AM, Rob Voyle robvo...@voyle.com wrote: Hi Folks I have a webpage called classroom.cfm It serves up a series of pdf handouts using cfcontent type = application/pdf file=#handoutFile# deleteFile = no handoutFile is the absolute path #handout# to a non web part of the server where the handouts are . Works fine except when someone wants to save the file to their computer the file is called classroom.pdf Is there a way to change the file name to #handout#. I have tried cfheader name=Content-Disposition value=filename=#handout# which doesn't work cfheader name=Content-Disposition value=attachment; filename=#handout# works but it forces the saving of the file i want the person to be able to read the file and then save it if they want. Thanks Rob ~| 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:353713 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 Russ creating objects is beyond my expertise and I couldn't get the sitepoint idea to work. Kept getting an object error. However my suspicion is that it wouldn't solve my problem. cfheader name=Content-disposition value=attachment;filename=#downloadFile# / forces the browser to save the file not view the file. I want people to first view it and then save it if they want. Rob On 30 Dec 2012 at 2:34, Russ Michaels wrote: try this. http://www.sitepoint.com/forums/showthread.php?640127-changing-filen ame-of-download-in-cfcontent ~| 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:353714 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
Rob, The following should work: cfheader name=Content-disposition value=inline;filename=#downloadFile# / -Dan On Saturday, December 29, 2012, Rob Voyle wrote: Hi Russ creating objects is beyond my expertise and I couldn't get the sitepoint idea to work. Kept getting an object error. However my suspicion is that it wouldn't solve my problem. cfheader name=Content-disposition value=attachment;filename=#downloadFile# / forces the browser to save the file not view the file. I want people to first view it and then save it if they want. Rob On 30 Dec 2012 at 2:34, Russ Michaels wrote: try this. http://www.sitepoint.com/forums/showthread.php?640127-changing-filen ame-of-download-in-cfcontent ~| 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:353715 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 Dan That doesn't work It opens the pdf fine: the url in the browser says www.host.com/webinars/classroom.cfm?handout=ai-session1.pdf and if I try to save the pdf file the file name is: classroom.pdf What I would like to do is save it as: ai-session1.pdf Rob On 29 Dec 2012 at 23:45, Dan G. Switzer, II wrote: Rob, The following should work: cfheader name=Content-disposition value=inline;filename=#downloadFile# / -Dan ~| 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:353716 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
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:353717 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFCONTENT does not reset
I came across a problem with CFCONTENT. Even if the attribute RESET=yes is used, the content which was previously set by cfhtmlhead is not reset. Ex 1: cfhtmlhead text = 'This is in the head section' cfcontent type=text/html; charset=ISO-8859-1 RESET=yes This shouldn't have the head section. /cfcontent Ex 2: headThis is in the head section/head cfcontent type=text/html; charset=ISO-8859-1 RESET=yes This shouldn't have the head section. /cfcontent In Ex 1, the text This is in the head section still appears in the page. In the ex 2 it does not. Is this a bug, or an undocumented feature ? Anyway, is there some way I could clear what was previously set with cfhtmlhead ? I believe this is the expected behavior. Once you use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc) you can't use functionality that lets you manipulate the storage buffer (CFCONTENT, CFFLUSH). Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| 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:352059 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFCONTENT does not reset
Once you use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc) you can't use functionality that lets you manipulate the storage buffer (CFCONTENT, CFFLUSH). Not so sure about this. I've noticed that the effect of CFHTMLHEAD is to find the HEAD.../HEAD pair in the output at the end of the output creation and simply insert the text right before the /HEAD tag. If no HEAD tag is found, the text will be added at the beging of the output buffer. You may use HEAD.../HEAD after CFHTMLHEAD, even as the last line in your template, and text added by CFHTMLHEAD will still be inserted inside the HEAD.../HEAD pair which proves that the action is performed at time the output buffer is sent and not at the moment CFHTMLHEAD is executed. My understanding is that the RESET action is executed first, then the CFHTMLHEAD action. This last operation shoud be canceled by the RESET and it is not. IMHO it is definitely a bug. ~| 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:352062 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFCONTENT does not reset
Once you use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc) you can't use functionality that lets you manipulate the storage buffer (CFCONTENT, CFFLUSH). I think it is actually the opposite: Once you have used CFCONTENT, CFFLUSH, you cannot use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc), simply because the output buffer is already gone. Look at the docs for CFHTMLHEAD: If you use this tag after the cfflush tag on a page, an error is thrown. ~| 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:352063 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFCONTENT in the background?
Use cfdocument not cfcontent. Documentation at: http://cfquickdocs.com/cf9/#cfdocument ~| 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:345366 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFCONTENT in the background?
Ah wait, sorry, didn't read the message properly. The answer is to use filename attribute of cfdocument - this saves the file on disk, and doesn't send it to the browser. ~| 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:345367 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent to serve PDF files hanging
Jason, I am experiencing a similar problem. Did you ever find out exactly what was causing yours? thanks, Stephen Thank you for the ideas. We are going to change the mime/type and also add some I/O logging to see if we can find a correlation there. Should we find the issue I will certainly post back. Thanks for the time! Jason ON the other hand... I would expect a mime/type problem to result in an error on the browser - not a hanging request, unless of the course the hanging is the browsers cycling through choices to figure out how to display the file. How may files are in the directory in question? Do you perhaps have an I/O problem? Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Good call I think Jake... The only think I could think of is use application/pdf for the Content-Type (that is technically the correct mime type). -Jake On Tue, Aug 31, 2010 at 10:33 AM, Jas ~| 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:344401 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
This is a known bug, please log in at the Adobe site and vote for getting it fixed: http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=83425 ~| 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:342913 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
This is a known bug, please log in at the Adobe site and vote for it: http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=83425 ~| 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:342914 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
well it works perfectly in all browsers except safari (windows)... after tearing all my hair out, realized the pop up block in safari was on! :\ ~| 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:342649 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
thanks for all the help, now works perfect! well it works perfectly in all browsers except safari (windows)... have searched the internet and found this is a common problem although even when i add the suggestions it still doesn't work, can anyone spot what is wrong with this code: cfheader name=Content-Disposition value=Attachment;FILENAME=#fileName# charset=utf-8 cfcontent type = application/vnd.ms-excel; charset=utf-8 file=#fullPath# deleteFile = yes many thanks ~| 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:342597 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
I thought I could remember something quirky. My memory sucks. If only I could remember if there's a resolution. Good luck. On Sat, Feb 26, 2011 at 6:35 AM, Richard White rich...@j7is.co.uk wrote: thanks for all the help, now works perfect! well it works perfectly in all browsers except safari (windows)... have searched the internet and found this is a common problem although even when i add the suggestions it still doesn't work, can anyone spot what is wrong with this code: cfheader name=Content-Disposition value=Attachment;FILENAME=#fileName# charset=utf-8 cfcontent type = application/vnd.ms-excel; charset=utf-8 file=#fullPath# deleteFile = yes many thanks ~| 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:342598 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
thanks for all the help, now works perfect! Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~| 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:342588 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfcontent and save as
To force a download no matter the type: cfheader name=Content-Type value=application/unknown / cfheader name=Content-Disposition value=attachment; filename=#filename# / Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Thursday, February 24, 2011 1:22 PM To: cf-talk Subject: cfcontent and save as Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~| 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:342595 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
Also, read this blog post of mine for more details on serving files up for download. http://www.trunkful.com/index.cfm/2010/8/4/Serving-File-Downloads-with-ColdFusion Wil Genovese Sr. Web Application Developer/ Systems Administrator CF Webtools www.cfwebtools.com wilg...@trunkful.com www.trunkful.com On Feb 25, 2011, at 4:09 PM, UXB wrote: To force a download no matter the type: cfheader name=Content-Type value=application/unknown / cfheader name=Content-Disposition value=attachment; filename=#filename# / Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Thursday, February 24, 2011 1:22 PM To: cf-talk Subject: cfcontent and save as Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~| 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:342596 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfcontent and save as
You need to use the cfheader tag and tell it the filename. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Friday, 25 February 2011 5:22 AM To: cf-talk Subject: cfcontent and save as Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~~ ~~~| 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:342583 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| 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:342584 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
This question comes up pretty often. I don't remember if there's actually a fix or not. I remember people having problems despite using cfheader to define content-type and disposition. Perhaps some of these will help: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:8207 On Thu, Feb 24, 2011 at 1:22 PM, Richard White rich...@j7is.co.uk wrote: Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~| 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:342585 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfcontent and save as
As long as you use attachment as well as filename in the cfcontent you will never have a problem. So it should something like this cfheader name=Content-Disposition value=Attachment;FILENAME=#FileName# Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, 25 February 2011 5:46 AM To: cf-talk Subject: Re: cfcontent and save as This question comes up pretty often. I don't remember if there's actually a fix or not. I remember people having problems despite using cfheader to define content-type and disposition. Perhaps some of these will help: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf- talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:8207 On Thu, Feb 24, 2011 at 1:22 PM, Richard White rich...@j7is.co.uk wrote: Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~~ ~~~| 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:342585 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| 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:342586 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent and save as
Ah, these are the threads I was remembering. http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62324#339820 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62324#339820 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62327#339828 http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339828 On Thu, Feb 24, 2011 at 1:56 PM, Andrew Scott andr...@andyscott.id.auwrote: As long as you use attachment as well as filename in the cfcontent you will never have a problem. So it should something like this cfheader name=Content-Disposition value=Attachment;FILENAME=#FileName# Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, 25 February 2011 5:46 AM To: cf-talk Subject: Re: cfcontent and save as This question comes up pretty often. I don't remember if there's actually a fix or not. I remember people having problems despite using cfheader to define content-type and disposition. Perhaps some of these will help: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf- talk/thread.cfm/threadid:24528 http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:8207 On Thu, Feb 24, 2011 at 1:22 PM, Richard White rich...@j7is.co.uk wrote: Hi, for security we store xls documents in a non-web root folder. We then use a cfcontent tag to serve the file to the user. the problem is when the user clicks the link they are displayed a download dialogue and all is fine if they click 'open with ms excel', but if they click 'save as' it saves the .cfm file and not the xls file is there a way to save the xls file if the user clicks 'save as' thanks ~~ ~~~| 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:342585 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| 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:342587 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFcontent puts \n at top of file -- solution?
I am generating a text file from an online database that needs to be opened by the VB application with a CHR(10) character delimeter between fields. The end user clicks download in my application and then saves the file to their computer to use with the VB application (3rd party written). Here is an example of my code. When opening the text file locally, it alway's has a new line character at the top of the file which chokes the VB program. Any suggestions on an alternate way of doing this? Even hardcoding the line this is a test in the cfsavecontent statement causes the /n character to be inserted at the top of the file. In the real application the text string is #fname# CHR(10) #lname# etc. !--- Store the text you want to stream. --- cfsavecontent variable=strText This is a test. /cfsavecontent You have a newline at the beginning and end of your CFSAVECONTENT, I suspect. Try rewriting it as a single line: cfsavecontent ...This is a test/cfsavecontent Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or on ~| 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:341013 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFcontent puts \n at top of file -- solution?
Either of these should work for you... cfsavecontent variable=strTextStart text here. /cfsavecontent OR cfcontent type=text/plain reset=true variable=#ToBinary(ToBase64(trim(strText)))# / ~| 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:341014 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent to serve PDF files hanging
Thank you for the ideas. We are going to change the mime/type and also add some I/O logging to see if we can find a correlation there. Should we find the issue I will certainly post back. Thanks for the time! Jason ON the other hand... I would expect a mime/type problem to result in an error on the browser - not a hanging request, unless of the course the hanging is the browsers cycling through choices to figure out how to display the file. How may files are in the directory in question? Do you perhaps have an I/O problem? Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Good call I think Jake... The only think I could think of is use application/pdf for the Content-Type (that is technically the correct mime type). -Jake On Tue, Aug 31, 2010 at 10:33 AM, Jas ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336740 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent to serve PDF files hanging
The only think I could think of is use application/pdf for the Content-Type (that is technically the correct mime type). -Jake On Tue, Aug 31, 2010 at 10:33 AM, Jason Fill jasonf...@gmail.com wrote: Our application uses cfcontent to serve back some PDF files and several times per day, the request for a pdf will just hang, like 300,000 + milliseconds to bring back a PDF that is already created. The code we are using is quite simple and each users file is fully generated before this call is made. cfcontent reset=true / cfheader name=Content-Type value=pdf cfheader name=Content-Disposition value=#type)#; filename=#userid#_file.pdf Has anyone ran into this before or have any ideas what might be going on? Thanks Jason ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336674 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfcontent to serve PDF files hanging
Good call I think Jake... -Original Message- From: Jake Churchill [mailto:reyna...@gmail.com] Sent: Tuesday, August 31, 2010 11:02 AM To: cf-talk Subject: Re: cfcontent to serve PDF files hanging The only think I could think of is use application/pdf for the Content-Type (that is technically the correct mime type). -Jake On Tue, Aug 31, 2010 at 10:33 AM, Jason Fill jasonf...@gmail.com wrote: Our application uses cfcontent to serve back some PDF files and several times per day, the request for a pdf will just hang, like 300,000 + milliseconds to bring back a PDF that is already created. The code we are using is quite simple and each users file is fully generated before this call is made. cfcontent reset=true / cfheader name=Content-Type value=pdf cfheader name=Content-Disposition value=#type)#; filename=#userid#_file.pdf Has anyone ran into this before or have any ideas what might be going on? Thanks Jason ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336676 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfcontent to serve PDF files hanging
ON the other hand... I would expect a mime/type problem to result in an error on the browser - not a hanging request, unless of the course the hanging is the browsers cycling through choices to figure out how to display the file. How may files are in the directory in question? Do you perhaps have an I/O problem? Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] Sent: Tuesday, August 31, 2010 11:13 AM To: cf-talk Subject: RE: cfcontent to serve PDF files hanging Good call I think Jake... -Original Message- From: Jake Churchill [mailto:reyna...@gmail.com] Sent: Tuesday, August 31, 2010 11:02 AM To: cf-talk Subject: Re: cfcontent to serve PDF files hanging The only think I could think of is use application/pdf for the Content-Type (that is technically the correct mime type). -Jake On Tue, Aug 31, 2010 at 10:33 AM, Jason Fill jasonf...@gmail.com wrote: Our application uses cfcontent to serve back some PDF files and several times per day, the request for a pdf will just hang, like 300,000 + milliseconds to bring back a PDF that is already created. The code we are using is quite simple and each users file is fully generated before this call is made. cfcontent reset=true / cfheader name=Content-Type value=pdf cfheader name=Content-Disposition value=#type)#; filename=#userid#_file.pdf Has anyone ran into this before or have any ideas what might be going on? Thanks Jason ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336678 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
On Tuesday 22 Jun 2010 14:11:24 you wrote: Hi All, I was wondering if somebody could help with a problem we have encountered since moving to ColdFusion 9 from ColdFusion 8. When we use CFContent to serve a file, it fails on large files (300+mb) but works on smaller (-30mb) files. It fails consistantly without a ColdFusion error, the browser receives a 404 error Does it get this error immediately ? Or after transferring some of the file ? I'd suspect some setting you've not copied into the new server, like request timeout or RAM limits. -- Tom Chiverton Helping to completely establish visionary second-generation one-to-one niches as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334725 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
Hi Tom, Everything has been double-checked and request limits checked. I tried on anther CF9 server and the same thing happens. CF8 with the exact same settings works I'm at a complete loss and wondering if anyone else out there with CF9 could try a simple test and see what happens? cfheader name=Content-Disposition value=attachment; filename=cf9.exe cfcontent type=unknown file=C:\temp\cf9.exe deletefile=No Dan. On Tue, Jun 22, 2010 at 2:50 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: On Tuesday 22 Jun 2010 14:11:24 you wrote: Hi All, I was wondering if somebody could help with a problem we have encountered since moving to ColdFusion 9 from ColdFusion 8. When we use CFContent to serve a file, it fails on large files (300+mb) but works on smaller (-30mb) files. It fails consistantly without a ColdFusion error, the browser receives a 404 error Does it get this error immediately ? Or after transferring some of the file ? I'd suspect some setting you've not copied into the new server, like request timeout or RAM limits. -- Tom Chiverton Helping to completely establish visionary second-generation one-to-one niches as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334728 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
On Tuesday 22 Jun 2010 14:57:12 Daniel Mackey wrote: cfheader name=Content-Disposition value=attachment; filename=cf9.exe cfcontent type=unknown file=C:\temp\cf9.exe deletefile=No Confirmed broken I think - congratulations, you've found a bug in ColdFusion :-) I'm on 64bit SuSE Linux here, so used the CF9.0.0 installer for that O/S - file not found in FireFox. Change the 'file' patch in CFCONTENT to a much smaller file like /etc/hosts and it all works as expected. Fun fun fun. -- Tom Chiverton Helping to continually disseminate vertical eigth-generation exceptional B2C e-tailers as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334729 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
Update: I now can't get anything to work on the box, because : Error,jrpp-15,06/22/10,15:10:25,billpack,Java heap space The specific sequence of files included or processed is: /home/chivertont/workspace/billpack/webroot/t.cfm'' java.lang.OutOfMemoryError: Java heap space Of course a swift bounce of CF fixes that, but I wonder if you could try increasing you heap size to beyond the file size and see what happens ? -- Tom Chiverton Helping to greatly seize B2B mission-critical compelling niches as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334731 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
Ugghhh. I was secretly hoping that wasn't going to be the case... Anyone got any alternatives? Could this be performed using Java? Dan. On Tue, Jun 22, 2010 at 3:10 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: On Tuesday 22 Jun 2010 14:57:12 Daniel Mackey wrote: cfheader name=Content-Disposition value=attachment; filename=cf9.exe cfcontent type=unknown file=C:\temp\cf9.exe deletefile=No Confirmed broken I think - congratulations, you've found a bug in ColdFusion :-) I'm on 64bit SuSE Linux here, so used the CF9.0.0 installer for that O/S - file not found in FireFox. Change the 'file' patch in CFCONTENT to a much smaller file like /etc/hosts and it all works as expected. Fun fun fun. -- Tom Chiverton Helping to continually disseminate vertical eigth-generation exceptional B2C e-tailers as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334732 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
That's interesting. I don't get any messages logged and the server stays up I might give the heap space a lash and see I'm always confused as to where to set the heap, perma and all that jazz and what effects it all has Dan. On Tue, Jun 22, 2010 at 3:11 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: Update: I now can't get anything to work on the box, because : Error,jrpp-15,06/22/10,15:10:25,billpack,Java heap space The specific sequence of files included or processed is: /home/chivertont/workspace/billpack/webroot/t.cfm'' java.lang.OutOfMemoryError: Java heap space Of course a swift bounce of CF fixes that, but I wonder if you could try increasing you heap size to beyond the file size and see what happens ? -- Tom Chiverton Helping to greatly seize B2B mission-critical compelling niches as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334734 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
Unfortunately changing the heap (to 1024) didn't make a blind bit of difference :-( Anyone got any suggestions on a possible work around? Dan. On Tue, Jun 22, 2010 at 3:24 PM, Daniel Mackey dmac...@gmail.com wrote: That's interesting. I don't get any messages logged and the server stays up I might give the heap space a lash and see I'm always confused as to where to set the heap, perma and all that jazz and what effects it all has Dan. On Tue, Jun 22, 2010 at 3:11 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: Update: I now can't get anything to work on the box, because : Error,jrpp-15,06/22/10,15:10:25,billpack,Java heap space The specific sequence of files included or processed is: /home/chivertont/workspace/billpack/webroot/t.cfm'' java.lang.OutOfMemoryError: Java heap space Of course a swift bounce of CF fixes that, but I wonder if you could try increasing you heap size to beyond the file size and see what happens ? -- Tom Chiverton Helping to greatly seize B2B mission-critical compelling niches as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334735 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFContent failing on large files since moving to ColdFusion 9
Did you restart the ColdFusion service after making this change? Increasing the Maximum JVM Heap Size doesn't take effect until the cf service is restarted. How much disk space is left on your server? How much ram does your server have? -Original Message- From: Daniel Mackey [mailto:dmac...@gmail.com] Sent: Tuesday, June 22, 2010 10:39 AM To: cf-talk Subject: Re: CFContent failing on large files since moving to ColdFusion 9 Unfortunately changing the heap (to 1024) didn't make a blind bit of difference :-( Anyone got any suggestions on a possible work around? Dan. On Tue, Jun 22, 2010 at 3:24 PM, Daniel Mackey dmac...@gmail.com wrote: That's interesting. I don't get any messages logged and the server stays up I might give the heap space a lash and see I'm always confused as to where to set the heap, perma and all that jazz and what effects it all has Dan. On Tue, Jun 22, 2010 at 3:11 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: Update: I now can't get anything to work on the box, because : Error,jrpp-15,06/22/10,15:10:25,billpack,Java heap space The specific sequence of files included or processed is: /home/chivertont/workspace/billpack/webroot/t.cfm'' java.lang.OutOfMemoryError: Java heap space Of course a swift bounce of CF fixes that, but I wonder if you could try increasing you heap size to beyond the file size and see what happens ? -- Tom Chiverton Helping to greatly seize B2B mission-critical compelling niches as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334739 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFContent failing on large files since moving to ColdFusion 9
Yeah, I restarted the service. We have 1 terrabyte free and 24gigs of RAM. I'm truly perplexed at this one. Exact same code ran fine on CF8 with the same settings on the same server Dan. On Tue, Jun 22, 2010 at 4:24 PM, Paul Alkema paulalkemadesi...@gmail.comwrote: Did you restart the ColdFusion service after making this change? Increasing the Maximum JVM Heap Size doesn't take effect until the cf service is restarted. How much disk space is left on your server? How much ram does your server have? -Original Message- From: Daniel Mackey [mailto:dmac...@gmail.com] Sent: Tuesday, June 22, 2010 10:39 AM To: cf-talk Subject: Re: CFContent failing on large files since moving to ColdFusion 9 Unfortunately changing the heap (to 1024) didn't make a blind bit of difference :-( Anyone got any suggestions on a possible work around? Dan. On Tue, Jun 22, 2010 at 3:24 PM, Daniel Mackey dmac...@gmail.com wrote: That's interesting. I don't get any messages logged and the server stays up I might give the heap space a lash and see I'm always confused as to where to set the heap, perma and all that jazz and what effects it all has Dan. On Tue, Jun 22, 2010 at 3:11 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: Update: I now can't get anything to work on the box, because : Error,jrpp-15,06/22/10,15:10:25,billpack,Java heap space The specific sequence of files included or processed is: /home/chivertont/workspace/billpack/webroot/t.cfm'' java.lang.OutOfMemoryError: Java heap space Of course a swift bounce of CF fixes that, but I wonder if you could try increasing you heap size to beyond the file size and see what happens ? -- Tom Chiverton Helping to greatly seize B2B mission-critical compelling niches as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334740 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfcontent with excel 2007
I have not tried this, but what if you change the cfcontent type to unknown? Like so: cfcontent type=unknown cfheader name=Content-Disposition value=filename=report.xlsx On Thu, Dec 31, 2009 at 2:37 AM, Christophe Maso zum...@hotmail.com wrote: Have seen a few posts around the web with this problem, but no evident solution. I have a cfm page that I want to make exportable to excel 2007 (.xlsx file). From what I've seen here: http://blogs.msdn.com/vsofficedeveloper/pages/Office-2007-Open-XML-MIME-Types.aspx it looks like the correct MIME type for Excel 2007 (.xlsx) files is NOT vnd.ms-excel, but rather application/vnd.openxmlformats-officedocument.spreadsheetml.sheet . So, when the proper url var is passed to the page, I include these lines of code: cfcontent type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet cfheader name=Content-Type value=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet cfheader name=Content-Disposition value=filename=report.xlsx And in that case the user is prompted to open or save the .xlsx file. However, Excel 2007 can't open the file; it gives an error message saying that the file format is not valid. No problem if I export it all using vnd.ms-excel as the MIME-type instead, but then it saves as an .xls file, not an .xlsx file. Any help on how I can get it to save as an .xlsx file? (Using CF8). Thanks, CM ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329395 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cfcontent MS Excel 2007 errors?
I've had the same problem, although the file will open after the user clicks yes. I Looked to see if there's a different MIME type to use for .xlsx files vs. .xls files, and there is (see http://blogs.msdn.com/vsofficedeveloper/pages/Office-2007-Open-XML-MIME-Types.aspx). But using that mime type didn't help at all; the file saved can't even be opened. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329368 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent create file
You want cfsavecontent, not cfcontent. Write the contents of the cfsavecontent variable into a file with cffile. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/14 Richard White rich...@j7is.co.uk: hi we are using cfcontent and rich text to create a word doc as follows: cfcontent type=application/mswordcfoutput{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0 etc.../cfoutput however when we run the cfm page it brings up the download option, whereas we want to create the file and store it on the server can anyone help with this? thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327189 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcontent create file
Richard, You don't really need CFCONTENT (which actually sets up headers in the browser). You are not trying to send your content to the output buffer of IIS. Try cfsavecontent instead. cfsavecontent variable=content {\rtf1\ansi\ansicpg1252\uc1\deff0=stshfdbch0 etc... /cfsavecontent cffile action=write output=#content# file=full file and path name.rff/ -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Wednesday, October 14, 2009 10:57 AM To: cf-talk Subject: cfcontent create file hi we are using cfcontent and rich text to create a word doc as follows: cfcontent type=application/mswordcfoutput{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfd bch0 etc.../cfoutput however when we run the cfm page it brings up the download option, whereas we want to create the file and store it on the server can anyone help with this? thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327190 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfcontent create file
This should work for you: cfsavecontent variable=myContent This is the content that will go into my .doc file. This is a test. /cfsavecontent cffile action=write file=#Replace(ExpandPath('*.*'),'*.*','')#test.doc output=#myContent# Best regards, Joshua Rowe -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Wednesday, October 14, 2009 8:57 AM To: cf-talk Subject: cfcontent create file hi we are using cfcontent and rich text to create a word doc as follows: cfcontent type=application/mswordcfoutput{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfd bch0 etc.../cfoutput however when we run the cfm page it brings up the download option, whereas we want to create the file and store it on the server can anyone help with this? thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327191 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent create file
thanks, that is exactly what we wanted richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327192 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent create file
Joshua Rowe wrote: This should work for you: cfsavecontent variable=myContent This is the content that will go into my .doc file. This is a test. /cfsavecontent cffile action=write file=#Replace(ExpandPath('*.*'),'*.*','')#test.doc output=#myContent# Best regards, Joshua Rowe But a 'doc' file type is a binary file type is it not? In my experience you can't just write simple text to a with a doc extension and get anything useful. I could see this working with an plain text (.txt) or rich text (.rtf) extension, but not a .doc extension. To create binary .doc types I believe you need to use the Word com object or the Java POI utilities do you not. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327193 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent create file
On Wed, Oct 14, 2009 at 12:32 PM, Ian Skinner h...@ilsweb.com wrote: But a 'doc' file type is a binary file type is it not? In my experience you can't just write simple text to a with a doc extension and get anything useful. I could see this working with an plain text (.txt) or rich text (.rtf) extension, but not a .doc extension. you can test this easily. Put a .txt file on your desktop with some content in it, rename it to a .doc and open it. It works just fine, at least in Word 2007 it does. I could test Word 2000 at home.. Word does format detection to figure out what KIND of word doc it is. It'll realize that his file is an RTF document, and it'll realize that your plain text document (tested above) is a text document, and display it just fine. Same way you can write HTML tables to a file, save it with a .XLS extension, and have it open in Excel. Ri ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327210 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent question
The first question I would ask is Why do they want the images stored in a non-web-accessible location If the answer is something lame like, they don't want users to be able to download them, then you can get around this whole issue as you can tell them that there is no way to totally prevent a user from downloading the image. If they have some valid answer like, they are concerned about people uploading something malicious or in that vein, then you can use several tricks to do it. If you have CF8, you can use the writeToBrowser function of CFIMAGE http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_i_02.html Which allows you to load up any image from anywhere on a server into memory and then output it to the browser HTH =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325043 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFContent and PDF problems
I have had this problem before. My extremely low tech solve was to shutdown browser and then remove adobe from memory through the task manager. hope this helps. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318296 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent downloads and IE
Hi, Did you manage to figure up this issue? I use IE7 and response.setContentType(application/vnd.ms-excel); response.setHeader(Content-disposition,attachment; filename=Book.xls); Like you I get a yellow bar To help protect your security, IE has blocked this site from downloading files... but when I click the yellow bar and select Download File, nothing happens Even in second attemp THANKS Tali Hello, I am trying to use cfcontent to make an excel sheet and in Internet Explorer 7 the yellow bar at the top does it's thing and says To help protect your security, IE has blocked this site from downloading files blah blah blah. I click the yellow bar and select Download File, but nothing happens. No file is downloaded. If I don't refresh the page and try it again I do get the option to save or open the file and everything looks great. Why doesn't the first attempt to download work? Here is my code: cfheader name=Content-Disposition value=inline; filename=SKUs. xls cfcontent type=application/ms-excel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311707 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFContent tag
Add a cfqueryparam to that code and we'll help you ;-) Have you tried killing the acrobat.exe process to make sure it isn't hung up on something. ~Brad - Original Message - From: Nathan Chen [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, August 16, 2008 10:44 PM Subject: CFContent tag Hi, All: I have a query that selects a BLOB field (embedded file) from a table. Then I use cfcontent to output the string to the browser. The code has running fine until today all of a sudden it won't display the files. All the files in that BLOB field are pdf files. The code looks like this: cfquery name=get_doc datasource=#dsn# SELECT contents FROM DOCUMENT where Document.PrimaryKey=#url.DocPK# /cfquery cfcontent type=application/pdf variable=#get_doc.contents# reset=yes When the page is run, Adobe Reader is open but with an error message saying The file is damaged and could not be repaired. When things like this happen, where should I look into it? Thanks. Nathan ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311138 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFContent tag
First, check that your datasource has the enable BLOB checkbox ticked. On Sun, Aug 17, 2008 at 11:44 AM, Nathan Chen wrote: Hi, All: I have a query that selects a BLOB field (embedded file) from a table. Then I use cfcontent to output the string to the browser. The code has running fine until today all of a sudden it won't display the files. All the files in that BLOB field are pdf files. The code looks like this: cfquery name=get_doc datasource=#dsn# SELECT contents FROM DOCUMENT where Document.PrimaryKey=#url.DocPK# /cfquery cfcontent type=application/pdf variable=#get_doc.contents# reset=yes When the page is run, Adobe Reader is open but with an error message saying The file is damaged and could not be repaired. When things like this happen, where should I look into it? Thanks. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311139 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFContent tag
That's it. I can't believe I forgot to turn enable BlOB when I updated the dsn today. Thank you! Nathan -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Saturday, August 16, 2008 9:47 PM To: CF-Talk Subject: Re: CFContent tag First, check that your datasource has the enable BLOB checkbox ticked. On Sun, Aug 17, 2008 at 11:44 AM, Nathan Chen wrote: Hi, All: I have a query that selects a BLOB field (embedded file) from a table. Then I use cfcontent to output the string to the browser. The code has running fine until today all of a sudden it won't display the files. All the files in that BLOB field are pdf files. The code looks like this: cfquery name=get_doc datasource=#dsn# SELECT contents FROM DOCUMENT where Document.PrimaryKey=#url.DocPK# /cfquery cfcontent type=application/pdf variable=#get_doc.contents# reset=yes When the page is run, Adobe Reader is open but with an error message saying The file is damaged and could not be repaired. When things like this happen, where should I look into it? Thanks. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311140 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfcontent gives my domainname instead of jpeg
Try: cfhttp method=get url=http://images.realworks.nl/servlets/images/media.objectmedia/3803552?wi dth=161height=121 getasbinary=auto result=result/ cfcontent type=image/jpg cfcontent reset=truecfoutput#ToString(result.Filecontent)#/cfoutputcfabort Adrian http://www.adrianlynch.co.uk/ -Original Message- From: marc -- [mailto:[EMAIL PROTECTED] Sent: 08 April 2008 14:12 To: CF-Talk Subject: cfcontent gives my domainname instead of jpeg Hi, If I do this: cfhttp method=get url=http://images.realworks.nl/servlets/images/media.objectmedia/3803552?wi dth=161height=121 getasbinary=auto result=result/ cfcontent type=image/jpg cfoutput#result.Filecontent#/cfoutput I should get a picture of a house for sale.Instead I get a picture with this text; http//marc.local.realworks.nl If I do this: cfhttp method=get url=http://images.realworks.nl/servlets/images/media.objectmedia/3803552?wi dth=161height=121 getasbinary=auto output=result.FileContent/ I get what I expected. Can anyone explain this??? CFMX 8 Win XP SP2 Apache 2.059 Firefox 2.0.0.13 ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302929 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent gives my domainname instead of jpeg
Hi Adrian, that (ToString) works. With it I get the picture, without it I get my domainname as a pict. Is there some logic behind this? If I save the result.FileContent (a binary stream) to a txt file there is all kind of text but not the domainname. Somehow it is there so that it gets displayed in the browser. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302932 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent gives my domainname instead of jpeg
ToString converts the binary into a text encoding so that it can be sent to the browser. Without it you're probably getting the result of an error handler, as binary data can't be directly output without converting to a string and this will be causing an exception. On Tue, Apr 8, 2008 at 9:47 PM, marc -- [EMAIL PROTECTED] wrote: Hi Adrian, that (ToString) works. With it I get the picture, without it I get my domainname as a pict. Is there some logic behind this? If I save the result.FileContent (a binary stream) to a txt file there is all kind of text but not the domainname. Somehow it is there so that it gets displayed in the browser. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302951 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcontent downloads and IE
Isn't it application/msexcel ? ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, February 04, 2008 11:26 AM To: CF-Talk Subject: cfcontent downloads and IE Hello, I am trying to use cfcontent to make an excel sheet and in Internet Explorer 7 the yellow bar at the top does it's thing and says To help protect your security, IE has blocked this site from downloading files blah blah blah. I click the yellow bar and select Download File, but nothing happens. No file is downloaded. If I don't refresh the page and try it again I do get the option to save or open the file and everything looks great. Why doesn't the first attempt to download work? Here is my code: cfheader name=Content-Disposition value=inline; filename=SKUs.xls cfcontent type=application/ms-excel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298094 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent - excel - numbers beginning with 0
You state that you are creating an Excel file... Is that an actual Excel binary file or is it a CSV file? As Barney stated, Excel isn't going to allow a number with leading zeros. You can format to display zeros in any app including Excel, but formatting and actual data content are 2 different beasts. If your users will be importing the data into their accounting software as a true number, then who cares if it has leading zeros. I'm sure that the accounting database will not store a number with leading zeros anyway. If it does, then it is text, not numeric. If you are creating CSV content that is streamed and opened in Excel, you can use =0001234 and Excel will display the leading zeros. Keep in mind that even though Excel displays it as you wish, the CSV content still contains =0001234. So... col1,col2 1,=001 will display as you wish in Excel, but sure won't import straight into the accounting package. If the users are reviewing the data and possibly modifying before importing, then they can open in Excel using the above format, make their changes and save. When Excel save the file, the equal and double quotes are stripped and the new CSV content will be: col1,col2 1,001 which should import into most anything. But guess what? If they reopen the file in Excel, the leading zeros are gone! I think you really need to decide on what your requirement is; text formatted with leading zeros or an actual numeric value. Terry I am creating an excel file in cf7 and all works well except when a part number begins with a 0 - i need the number to always have 5 digits as in 01234 or 12345. i have tried doing a Numberformat(partnum, '0') to no avail. can i force using TabChar or something? noticed the the field in the created excel file will not accept a 0 even typed in manually. thanks in advance ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288504 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent - excel - numbers beginning with 0
Dunno how to do this from CF, but Excel allows you to set a format for a cell. So if you set the cell format as 'text', it won't strip the leading zeros. I just fired up Excel, set one column as a 'text' format, the next untouched, and typed in '01234' in both. The first one (text column) held the zero, the unformatted column stripped it. --Scott ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288435 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent - excel - numbers beginning with 0
Within Excel itself, prefixing a numberish value with an apostrophe will make it render as a string (and be absolved from zero-trimming). Did you try that? cheers, barneyb On 9/13/07, andy mann [EMAIL PROTECTED] wrote: I am creating an excel file in cf7 and all works well except when a part number begins with a 0 - i need the number to always have 5 digits as in 01234 or 12345. i have tried doing a Numberformat(partnum, '0') to no avail. can i force using TabChar or something? noticed the the field in the created excel file will not accept a 0 even typed in manually. thanks in advance -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288434 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent - excel - numbers beginning with 0
Within Excel itself, prefixing a numberish value with an apostrophe will make it render as a string (and be absolved from zero-trimming). Did you try that? cheers, barneyb -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288447 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent - excel - numbers beginning with 0
tnx bb, as the visitor will be importing excel file into their acctg software, field must remain numeric... also anyone know how to apply col width as seems to default to 48px tnx again Within Excel itself, prefixing a numberish value with an apostrophe will make it render as a string (and be absolved from zero-trimming). Did you try that? cheers, barneyb -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288448 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent - excel - numbers beginning with 0
bb, tnx problem is that field must remain numeric... also anyone know how to reset default col width when excel file generated? ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288449 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent - excel - numbers beginning with 0
You've got a bit of a contradiction in your statements. If it MUST remain numeric, then it's a number, and you can't care about leading zeros because from a numeric perspective 123 and 0123 are identical. If you do care about the leading zeros, then you can't be dealing with a numeric context, you must be dealing with a textual (or character-based) context. However, Excel does a pretty good job of implicit conversions, so I'd wager you can import a text column as numeric values if the data is clean (i.e. all numeric). cheers, barneyb On 9/13/07, andy mann [EMAIL PROTECTED] wrote: tnx bb, as the visitor will be importing excel file into their acctg software, field must remain numeric... also anyone know how to apply col width as seems to default to 48px tnx again -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288450 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent
Use cfheader and cfcontent to set they data type, reset the output, etc. Then just print the XML. If you really need to FORCE them to download it (something I'd not recommend), you could always misset the MIME type to something like application/octet-stream. --Ben Doom Chad Gray wrote: I want cfcontent to take xml data from a query and force the user to download it as an XML file. Any tips? I keep getting a CF Error if I put the xml in the variable attribute of cfcontent. java.lang.String is not a supported variable type. The variable is expected to contain binary data. ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284525 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent
You don't put it in the variable paramter, but rather between the tags. cfcontent#myXMLString/cfcontent You will probably want to provide the proper content headers with cfheader... tags before this. ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284467 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcontent
Chad, Variable only take binary values. Good news - you can easily convert string to binary: cfcontent type=text/xml variable=#ToBinary( ToBase64( 'YOUR_STRING' ) )# / .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 4:59 PM To: CF-Talk Subject: cfcontent I want cfcontent to take xml data from a query and force the user to download it as an XML file. Any tips? I keep getting a CF Error if I put the xml in the variable attribute of cfcontent. java.lang.String is not a supported variable type. The variable is expected to contain binary data. ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284469 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcontent
Thanks Ian and Ben, I got is working now. Next question. Firefox does not like the fact that the file name has spaces in it. With the below code the file that is saved is test With IE it replaces the space with an underscore. test_1234.xml cfheader name=Content-Disposition value=attachment; filename=test 1234.xml cfcontent type=application/xml cfoutput#getZJF.ZJF#/cfoutput /cfcontent How do I get firefox and IE to write out the correct file name? Thanks again! Chad -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 5:12 PM To: CF-Talk Subject: Re: cfcontent You don't put it in the variable paramter, but rather between the tags. cfcontent#myXMLString/cfcontent You will probably want to provide the proper content headers with cfheader... tags before this. ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284470 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcontent
No worries: cfheader name=Content-Disposition value=attachment; filename=test 1234.xml Wrap file name in double quotes (NO single quotes)... Just remember to escape them . .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 5:26 PM To: CF-Talk Subject: RE: cfcontent Thanks Ian and Ben, I got is working now. Next question. Firefox does not like the fact that the file name has spaces in it. With the below code the file that is saved is test With IE it replaces the space with an underscore. test_1234.xml cfheader name=Content-Disposition value=attachment; filename=test 1234.xml cfcontent type=application/xml cfoutput#getZJF.ZJF#/cfoutput /cfcontent How do I get firefox and IE to write out the correct file name? Thanks again! Chad ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284471 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfcontent
Hah! Brilliant! Thanks Ben! -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 5:29 PM To: CF-Talk Subject: RE: cfcontent No worries: cfheader name=Content-Disposition value=attachment; filename=test 1234.xml Wrap file name in double quotes (NO single quotes)... Just remember to escape them . ... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 5:26 PM To: CF-Talk Subject: RE: cfcontent Thanks Ian and Ben, I got is working now. Next question. Firefox does not like the fact that the file name has spaces in it. With the below code the file that is saved is test With IE it replaces the space with an underscore. test_1234.xml cfheader name=Content-Disposition value=attachment; filename=test 1234.xml cfcontent type=application/xml cfoutput#getZJF.ZJF#/cfoutput /cfcontent How do I get firefox and IE to write out the correct file name? Thanks again! Chad ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284472 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfcontent
No worries. I only learned that last week :) http://www.bennadel.com/index.cfm?dax=blog:839.view Cheers. .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 5:35 PM To: CF-Talk Subject: RE: cfcontent Hah! Brilliant! Thanks Ben! ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284474 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent
Use the URL encoding for a space [%20] perhaps? cfheader name=Content-Disposition value=attachment; filename=test%201234.xml But spaces in file names should usually be avoided when possible in web applications. ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284475 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcontent
Ya I tried that, but you get the literal %20 in the name... Ben's surrounding with double quotes fixed firefox to have the proper name, but IE still replaces the blanks with underscores. That is not too bad I would like IE to get the name absolutely right. -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 5:40 PM To: CF-Talk Subject: Re: cfcontent Use the URL encoding for a space [%20] perhaps? cfheader name=Content-Disposition value=attachment; filename=test%201234.xml But spaces in file names should usually be avoided when possible in web applications. ~| ColdFusion 8 beta - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284476 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent excel session and url variables
Good Afternoon, Thank you all for your replies. Initially, taking out the cfcontent tags did not yield any negative results. The page came back fine to the browser. Putting the tags back on, and looking at the log files more or less confirmed what was happening, I just don't know why. There is a behind the scene login process that occurs. We capture the windows login ID by using an activeX control, and storing it in a session variable. That activeX control is called on a page that is called with a cflocation in the onSessionStart of the Application.cfc. In the log files, it shows that login page trying to be called within the directory structure of the page trying to generate the excel. It appears, in some instances, that excel is not being recognized by the current session, depending on the variables being passed in the URL. We had tried using the URLencoded tag, which seemed to break things to a greater degree, for some reason. For the time being, we replaced the spaces in the URL variable with %20 which appears to fix the problem, but I still don't think that is truly the correct one. Thanx again for all your help! Bill ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275169 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfcontent excel session and url variables
Also check your exception log. Even if an error does make it to the browser it should be logged there. Jaime Metcher -Original Message- From: Kris Jones [mailto:[EMAIL PROTECTED] Sent: Saturday, 7 April 2007 6:58 AM To: CF-Talk Subject: Re: cfcontent excel session and url variables Hi William, We also use this method for handling excel formatting of reports, although we use the form scope, not the URL. We have also seen the could not open error. After much investigation, we found that this error was due to a CF error that would naturally not propagate through to excel. The way we fixed it was to run the report with the cfcontent/cfheader commented out, and see the actual CF error, fix it, uncomment the cfcontent/cfheader and run it again. In every case, we were able to fix the problem. Usually it was a reference to an undefined variable causing the problem. Also, you should probably wrap your URL variables in a urlencodedformat() for good measure (we also encrypt ours, but depending on your requirements that may not be necessary). Cheers, Kris A question relating to cfcontent and session variables, with a hint of URL variables. We are migrating from a relatively open system to one that has a login and session management. We have stumbled across something that seems to be behaving oddly, though I don't know why. We have a coldfusion page that will generate a report as HTML. If the user selects a button to save it to excel, it runs the same page, but inserts the CFCONTENT TYPE=application/vnd.ms-excel reset=yes CFHEADER NAME=Content-Disposition VALUE=filename=myreport.xls at the top. The only other difference, is the variables to generate are passed through as URL variables. Before adding the session, they worked fine. Now though, and it is not all situations, it almost seems like IE or Excel are trying to open a new instance of IE outside of the session in an attempt to download the file. As I said though, it is not all. This link... reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalreporttype=ABCreport param=465saveToFile=yes does not work, with excel popping up an error message saying Cold not open http://mysite/reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalreporttype=ABCreportparam=465 saveToFile=yes Now, if I run a slightly different report type, the exact same url with maybe another parameter like this reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalfocusstate=CAreporttype=ABCre portparam=465saveToFile=yes It opens fine, no issues. The only thing I found that may fix the problem is changing the spaces in the url variable to %20 This falls into different reports doing different things, not common code so there is a lot of places to change it, with no full assurance that this will fix the issue. Anyone run into anything similar? Thanx! ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274812 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent excel session and url variables
Hi William, We also use this method for handling excel formatting of reports, although we use the form scope, not the URL. We have also seen the could not open error. After much investigation, we found that this error was due to a CF error that would naturally not propagate through to excel. The way we fixed it was to run the report with the cfcontent/cfheader commented out, and see the actual CF error, fix it, uncomment the cfcontent/cfheader and run it again. In every case, we were able to fix the problem. Usually it was a reference to an undefined variable causing the problem. Also, you should probably wrap your URL variables in a urlencodedformat() for good measure (we also encrypt ours, but depending on your requirements that may not be necessary). Cheers, Kris A question relating to cfcontent and session variables, with a hint of URL variables. We are migrating from a relatively open system to one that has a login and session management. We have stumbled across something that seems to be behaving oddly, though I don't know why. We have a coldfusion page that will generate a report as HTML. If the user selects a button to save it to excel, it runs the same page, but inserts the CFCONTENT TYPE=application/vnd.ms-excel reset=yes CFHEADER NAME=Content-Disposition VALUE=filename=myreport.xls at the top. The only other difference, is the variables to generate are passed through as URL variables. Before adding the session, they worked fine. Now though, and it is not all situations, it almost seems like IE or Excel are trying to open a new instance of IE outside of the session in an attempt to download the file. As I said though, it is not all. This link... reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalreporttype=ABCreportparam=465saveToFile=yes does not work, with excel popping up an error message saying Cold not open http://mysite/reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalreporttype=ABCreportparam=465saveToFile=yes Now, if I run a slightly different report type, the exact same url with maybe another parameter like this reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalfocusstate=CAreporttype=ABCreportparam=465saveToFile=yes It opens fine, no issues. The only thing I found that may fix the problem is changing the spaces in the url variable to %20 This falls into different reports doing different things, not common code so there is a lot of places to change it, with no full assurance that this will fix the issue. Anyone run into anything similar? Thanx! ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274734 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cfcontent type=application/word style ignored??
Ben Nadel wrote: I find that word (as web page) puts 3D in front of each of it attributes: p style=3Dcolor:black; Here is text /p I think it is 3D but it might be something else. =3D is the representation of the equals sign = in quoted-printable encoding. = is the escape character and 3D is the hex representation of = itself. If you have this in a document you will need to do additional transformations to make it valid. See RFC 2045 for details. Jochem ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274174 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cfcontent type=application/word style ignored??
Oooh. That is good to know :) I had no idea what they did that. Thanks for the tip. .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, March 30, 2007 4:06 AM To: CF-Talk Subject: Re: Cfcontent type=application/word style ignored?? Ben Nadel wrote: I find that word (as web page) puts 3D in front of each of it attributes: p style=3Dcolor:black; Here is text /p I think it is 3D but it might be something else. =3D is the representation of the equals sign = in quoted-printable encoding. = is the escape character and 3D is the hex representation of = itself. If you have this in a document you will need to do additional transformations to make it valid. See RFC 2045 for details. Jochem ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274181 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Cfcontent type=application/word style ignored??
I find that word (as web page) puts 3D in front of each of it attributes: p style=3Dcolor:black; Here is text /p I think it is 3D but it might be something else. What kind of document is it really? Is it really just an HTML page that is being used by Word? .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: John [mailto:[EMAIL PROTECTED] Sent: Thursday, March 29, 2007 6:11 PM To: CF-Talk Subject: Cfcontent type=application/word style ignored?? I'm outputting a word file and all of my style rules are ignored such as font-family, font-size etc...Any idea how get Word to use my style rules? Thanks! ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274147 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cfcontent type=application/word style ignored??
I have done this last week. I had a page with a css full of styles and stuff and worked fine. Maybe it worked on word because I was using the id of the elements instead of classes ( #content { ... } instead of .content { ... } Or maybe because the styles were on the same page. The styles are on the same page , or via link ... or @include ? I used : CFHEADER NAME=Content-Disposition VALUE=INLINE; FILENAME=file.doc CFCONTENT TYPE=application/msword cfoutput html head style type=text/css classes and etc. /style /head body . /body /html /cfoutput John wrote: I'm outputting a word file and all of my style rules are ignored such as font-family, font-size etc...Any idea how get Word to use my style rules? Thanks! ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274148 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfcontent, deleting images within a page
Scott, You call the captcha file directly from within the img tag: img src=randomWord.cfm alt=Captcha Img / When you post the form, you compare the Captcha input to the session variable set in the cfm that generates the captcha. With CFX_Captcha I believe the variable it sets is SESSION.imgvalue HTH, Jon Hey gang, I'm having some trouble getting something to work as expected. I've got a script that generates a form based on data in a DB. I'm adding a CAPTCHA to it - Ryan Emerle's cfx_captcha to be specific. In the example page that came with the tag, in the end it spits out: cfcontent type=image/jpeg file=(file path) deletefile=Yes which displays the image that was generated, and deletes it. I can't seem to work out how to do the same thing within my form, without it munging things up - currently instead of the form, image, and surrounding stuff, it simply displays the URL of the page in question. Currently I'm just displaying the generated image with a standard img tag, and if need be, I can just run a clean-up script on the directory that the images are generated into, but that's clunky. :( Poking around the help files in DW, I can't seem to find anything that helps as far as dealing with this issue. Hence, CF-Talk! :) Any pointers in the right direction would be great. Thanks- --Scott ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266015 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFContent and MIME Types
Hello, I'm trying to use cfcontent on Coldfusion 5 to display files. For security purposes, I cannot link directly to the files. I'm trying to get this to work for any type of file. Currently it works for .doc and .xls files but not PDF files. The page does not throw any exceptions just displays a blank PDF page. When I right click that link and save it to my computer, it works just fine. Is there a bug with cfcontent in CF5? Example code below: cfheader name=Content-disposition value=inline;filename=#filename# cfcontent type=Application/Unknown file=#fileName# I would just like to add that is there anyway to dynamically determine the MIME type when using cfcontent? I have tried to hardcode the MIME Type to handle PDFs and the files still do not display in the browser. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257591 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFContent and MIME Types
Green Parot wrote: I would just like to add that is there anyway to dynamically determine the MIME type when using cfcontent? where filepath is the full physical path to a file you wish to determine the mimetype of... #getPageContext().getServletContext().getMimeType(filePath)# should work to get the mime type. As for your problem.. I do what you're doing all the time. Here's what my CFCONTENT looks like: CFCONTENT deletefile=Yes file=#filePath# type=application/pdf Now, for some reason, my code actually copies the ORIGINAL pdf file to a temporary location, then deletes it when it's accessed. I don't know why I did that, but maybe it's because I was having a hard time getting it to display the original PDF file without the deletefile option. Worth a shot for you. Rick ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257665 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFContent and MIME Types
That won't work for CF5. That only works on MX and up as far as I know. On 10/20/06, Rick Root [EMAIL PROTECTED] wrote: Green Parot wrote: I would just like to add that is there anyway to dynamically determine the MIME type when using cfcontent? where filepath is the full physical path to a file you wish to determine the mimetype of... #getPageContext().getServletContext().getMimeType(filePath)# should work to get the mime type. As for your problem.. I do what you're doing all the time. Here's what my CFCONTENT looks like: CFCONTENT deletefile=Yes file=#filePath# type=application/pdf Now, for some reason, my code actually copies the ORIGINAL pdf file to a temporary location, then deletes it when it's accessed. I don't know why I did that, but maybe it's because I was having a hard time getting it to display the original PDF file without the deletefile option. Worth a shot for you. Rick ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257667 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFCONTENT and CFHEADER to download a file on CF 5
How To Raise a File Download Dialog Box for a Known MIME Type http://support.microsoft.com/default.aspx?scid=kb;EN-US;q260519 cfheader name=Content-Type value=application/powerpoint cfheader name=Content-Disposition value=attachment; filename=test.ppt Try that. I've got a .mht (multipart html) that I generated from powerpoint. My end result is to be able to fill in pieces of a powerpoint slide on the fly with CF to generate the appropriate .mht file to a user. However, if I pass it to the user as an .mht, it tries to open in the browser. I added a cfcontent and cfheader to the top of the page to try to get it to force the filename to go back to the browser as a ppt so they can save it or open it. The code works fine on MX 6.1 but I can't get it to work on CF5. Anyone have any gotchas or reasons why I can't do it? Snippet: cfheader name=Content-Type value=application/powerpoint cfheader name=Content-Disposition value=inline; filename=test. ppt I also tried to use a cfcontent type=application/powerpoint reset=yes and all the combinations I could think of but it just wouldn't work. Like I said I copied the exact same code to 6.1 and all works well. John Burns ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251361 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent error - IE6 XP SP2 client and Win 2003 server
You can also get this error when you run out of disk space and ColdFusion cannot physically write the file to disk. -- Sent from my BlackBerry Wireless Device This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: michael acadia [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Fri Jul 21 20:30:52 2006 Subject: RE: cfcontent error - IE6 XP SP2 client and Win 2003 server Is the production server using a Cache-Control: no-cache HTTP header? I ran into a similar problem yesterday when opening a Word doc served by cfcontent (Win2k3 server). If MS Word was closed when I tried to open the doc from the web page, the no-cache was deleting the file before Word started up - resulting in Word's 'file not found' error. If, however, Word was already open, the doc displayed with no problem. Never had any trouble saving the file to my desktop. FWIW, this behavior was only occurring in IE6 - Firefox had no problems. Since I need the no-cache in place, my solution was to drop the 'attachment' value from cfheader: cfheader name=Content-Disposition value=filename=#filename# instead of cfheader name=Content-Disposition value=attachment;filename=#filename# IE now displays the Word doc inside the browser (not what I wanted), but at least the user doesn't get an error. hth, -michael Original Message Subject: cfcontent error - IE6 XP SP2 client and Win 2003 server From: Peter Legg [EMAIL PROTECTED] Date: Fri, July 21, 2006 2:56 pm To: CF-Talk cf-talk@houseoffusion.com I've got a page that produces and Excel file for the user to either open or save. Here's the code: cfcontent type=application/msexcel cfheader name=Content-Disposition value=attachment;filename=#filename# This works fine from my Win2000 PC. However, it can't be opened using IE6 on an XP service pack 2 PC when hitting the production site, a Win 2003 server. The file can be saved. When accessing the development site, a Win 2000 server, both open and save work from this PC. Here's an example of the error: C:\Documents and Settings\username\Local Settings\Temporary Internet Files\Content.IE5\89GL2345\filename.xls could not be found It obviously has to do with the ability to read/write to the Content.IE5 directory, which isn't visible, but just haven't been able to figure it out. I've been able to reset the attributes of the folder in order to see it but that hasn't solved the problem either. Any ideas? Thanks, Peter ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247588 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcontent error - IE6 XP SP2 client and Win 2003 server
Is the production server using a Cache-Control: no-cache HTTP header? I ran into a similar problem yesterday when opening a Word doc served by cfcontent (Win2k3 server). If MS Word was closed when I tried to open the doc from the web page, the no-cache was deleting the file before Word started up - resulting in Word's 'file not found' error. If, however, Word was already open, the doc displayed with no problem. Never had any trouble saving the file to my desktop. FWIW, this behavior was only occurring in IE6 - Firefox had no problems. Since I need the no-cache in place, my solution was to drop the 'attachment' value from cfheader: cfheader name=Content-Disposition value=filename=#filename# instead of cfheader name=Content-Disposition value=attachment;filename=#filename# IE now displays the Word doc inside the browser (not what I wanted), but at least the user doesn't get an error. hth, -michael Original Message Subject: cfcontent error - IE6 XP SP2 client and Win 2003 server From: Peter Legg [EMAIL PROTECTED] Date: Fri, July 21, 2006 2:56 pm To: CF-Talk cf-talk@houseoffusion.com I've got a page that produces and Excel file for the user to either open or save. Here's the code: cfcontent type=application/msexcel cfheader name=Content-Disposition value=attachment;filename=#filename# This works fine from my Win2000 PC. However, it can't be opened using IE6 on an XP service pack 2 PC when hitting the production site, a Win 2003 server. The file can be saved. When accessing the development site, a Win 2000 server, both open and save work from this PC. Here's an example of the error: C:\Documents and Settings\username\Local Settings\Temporary Internet Files\Content.IE5\89GL2345\filename.xls could not be found It obviously has to do with the ability to read/write to the Content.IE5 directory, which isn't visible, but just haven't been able to figure it out. I've been able to reset the attributes of the folder in order to see it but that hasn't solved the problem either. Any ideas? Thanks, Peter ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247341 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent error - IE6 XP SP2 client and Win 2003 server
Peter, I'm using the same cache-control values on my server for the same reason. I'll have to try removing 'no-cache, no-store'. I'm not sure how or if that would affect form submissions. Unfortunately, I'm about to take off for a week and won't have a chance to test until I get back. FWIW, here's the full IETF RFC for HTTP 1.1 http://www.ietf.org/rfc/rfc2616.txt The sections relevant to caching begin around page 110. Without reading the whole thing, it appears that it might be possible to replay a form submission by removing the controls (assuming the user is still logged in). I'd be interested to hear what you find out if you test this. Thanks, michael -- michael acadia | [EMAIL PROTECTED] Peter Legg wrote: Michael, Yes, that's it! I added the following to the application.cfm file recently: cfheader name=Expires value=#GetHttpTimeString(Now())# cfheader name=Pragma value=no-cache cfheader name=cache-control value=no-cache, no-store, must-revalidate I did it primarily to prevent those logged out from using the back button to view the previous pages. I removed no-cache, no-store, from the last one and it works fine - still prevents the use of the back button. I guess I may still have problems with duplicate form submissions? Thanks for your help, Peter ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247401 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFContent cancels out JS
Can you walk me through this a touch? I have a page that dumps a database using cfdump. Above the cfdump is a button that says download to excel. If clicked, do I reload the page, do a cfcontent and output the database info into a table, then reload the original page (with the button and the cfdump) using cflocation? I don't understand the process that you're suggesting but it sounds right-on. CFCONTENT cancels out any previously generated content so your banner, menus etc will not show. Use a CFABORT after it if necessary to prevent any content generated after your excel file from showing too, although a properly structured page shouldn't need that. This way you don't need the extra page. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222891 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFContent cancels out JS
It's even eaiser than that. cfif StructKeyExists(FORM,WhateverYouCallTheSubmitButton) cfcontent ...etc for the cfcontent bit cfelse !--- your entire page, cfdump, form and all here --- /cfif This way the page shows the webpage in the browser unless the form button is clicked - the self posting form then causes the excel file to download with out any of the annoying new window stuff. I've used this exact technique in pages before with great success. On 11/2/05, daniel kessler [EMAIL PROTECTED] wrote: Can you walk me through this a touch? I have a page that dumps a database using cfdump. Above the cfdump is a button that says download to excel. If clicked, do I reload the page, do a cfcontent and output the database info into a table, then reload the original page (with the button and the cfdump) using cflocation? I don't understand the process that you're suggesting but it sounds right-on. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222904 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFContent cancels out JS
That worked great! I kept the download code as a separate page and just did a cfinclude on it. Wonderful. Thank for your help! It's even eaiser than that. cfif StructKeyExists(FORM,WhateverYouCallTheSubmitButton) cfcontent ... etc for the cfcontent bit cfelse !--- your entire page, cfdump, form and all here --- /cfif ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222950 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFContent cancels out JS
p align=\left\bfont face=\Arial\ size=\2\GFI MailSecurity's HTML threat engine found HTML scripts in this email and has disabled them./font/b/pHmmm. The only place I've seen this happen is with Firefox where it opens a window, or tab, when you click a link that starts a download. However, I have not seen this happen in IE. Technically, I don't see how you can download a stream, then have the browser take another action. Usually, the page doesn't change, but you get the File Save dialog box only. M!ke -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 01, 2005 8:20 AM To: CF-Talk Subject: CFContent cancels out JS I display a database (cfdump) with a download database button at the top. That'll take you to another page that downloads the database using the table as a file_name. This is done through cfcontent. When I do this, it opens up a new window, so at the end of the CF code, I put some js, window.close(); to get rid of the window. Unfortunately, with cfcontent in the page, the window.close() is ignored. Remove the cfcontent and all is fine. What is a good way to close this window then? Here's my code: Xcript language=javascript!-- function closeIt(){ window.close(); } --/Xcript CFQUERY NAME=retrieved_data DATASOURCE=eatsmart SELECT * FROM #url.table# /CFQUERY cfsetting showdebugoutput=No cfoutput cfheader name=Content-Disposition value=inline; filename=#url.table#.xls /cfoutput cfcontent type=application/msexcel cfset column_ar = listToArray(retrieved_data.columnlist) table border=1 cellspacing=0 cellpadding=0 tr cfset column_ar = listToArray(retrieved_data.columnlist) cfloop from=1 to=#arrayLen(column_ar)# index=ii cfset content = column_ar[ii] td bgcolor=##CBE4F4cfoutput#content#/cfoutput/td /cfloop /tr cfoutput query=retrieved_data tr cfloop list=#retrieved_data.columnlist# index=col cfset content = retrieved_data[col][currentRow] td#content#/td /cfloop /tr /cfoutput /table Xcript language=javascript!--closeIt();--/Xcript ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222838 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFContent cancels out JS
I display a database (cfdump) with a download database button at the top. That'll take you to another page that downloads the database using the table as a file_name. This is done through cfcontent. When I do this, it opens up a new window, so at the end of the CF code, I put some js, window.close(); to get rid of the window. Unfortunately, with cfcontent in the page, the window.close() is ignored. Remove the cfcontent and all is fine. If you tell your browser that your content is for Excel, your content has to be understandable by Excel. Excel understands HTML, but not JavaScript. But in any case, I'm not sure what you're trying to accomplish. Do you really want the window to close as soon as it appears? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222841 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFContent cancels out JS
well, I'd like the blank window to close instead of just sitting there with the user wondering what to do. It doesn't seem that I can put a close before the cfcontent either. I put this content on a seperate page because otherwise it tries to take all my page information (banner, menus, etc) and tries to make a file out of that too. So now it goes to a seperate page, sets up the content, then does a cfcontent. This page appears empty so I'd like to close it. Did I explain that well or am I missing the question? I display a database (cfdump) with a download database button at the top. That'll take you to another page that downloads the database using the table as a file_name. This is done through cfcontent. When I do this, it opens up a new window, so at the end of the CF code, I put some js, window.close(); to get rid of the window. Unfortunately, with cfcontent in the page, the window.close() is ignored. Remove the cfcontent and all is fine. If you tell your browser that your content is for Excel, your content has to be understandable by Excel. Excel understands HTML, but not JavaScript. But in any case, I'm not sure what you're trying to accomplish. Do you really want the window to close as soon as it appears? ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222845 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFContent question ...
After I have created a document using cfdocument I am using the following code to open the pdf, cfheader name=content-disposition value=attachment; filename=wibble.pdf cfcontent type=aplication/pdf file=#expandpath('MyFilePath')# deletefile=yes reset=no This shows a dialogue box to the user giving the option of either saving the document, opening it or cancvel. What I want to be able to do is remove the option to open it (I think I set the type to application/unknow to do this) but I also need to be able to capture whether the user actually clicked save or cancel, is this possible? Nope. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217006 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFContent question ...
Thanks for that, at least I won't waste any more time looking :-) -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: 31 August 2005 17:29 To: CF-Talk Subject: Re: CFContent question ... After I have created a document using cfdocument I am using the following code to open the pdf, cfheader name=content-disposition value=attachment; filename=wibble.pdf cfcontent type=aplication/pdf file=#expandpath('MyFilePath')# deletefile=yes reset=no This shows a dialogue box to the user giving the option of either saving the document, opening it or cancvel. What I want to be able to do is remove the option to open it (I think I set the type to application/unknow to do this) but I also need to be able to capture whether the user actually clicked save or cancel, is this possible? Nope. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217013 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54