Re: cfheader - thanks
Better yet, make it unobtrusive by using rel="external" in the A-tag. the needed JS: $(document).ready(function(){ $("a[rel=external]").each(function(){ this.target="_blank"; }); }); Sebastiaan Naafs - van Dijk http://onlinebase.nl/ On 02/10/2014 04:12 PM, Rob Voyle wrote: > Thanks Steve - so simple! > > On 10 Feb 2014 at 10:02, Steve Milburn wrote: > >> Why not put target="_blank" in the tag on the page that is >> linked to >> the pdf? >> >> Steve >> > > > ~| 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:357654 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader - thanks
Thanks Steve - so simple! On 10 Feb 2014 at 10:02, Steve Milburn wrote: > > Why not put target="_blank" in the tag on the page that is > linked to > the pdf? > > Steve > ~| 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:357649 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader
Why not put target="_blank" in the tag on the page that is linked to the pdf? Steve On Mon, Feb 10, 2014 at 9:56 AM, Rob Voyle wrote: > > Hi folks > > I am using > > > > > > to display a pdf and it works fine, but I would like to open it in a new > window > > Is there a way to open the pdf in a new browser window such as the html > target="_blank" does. > > 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:357646 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFHeader Problem
> but I have a related question for you. If you're serving files in your web > root, why are you bothering to use CFCONTENT to serve them? This of that example as "foo". It's for illustration only :-) Robert Harrison Director of Interactive Services Austin & Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Tuesday, June 26, 2012 10:27 PM To: cf-talk Subject: Re: CFHeader Problem > What's wrong with the below? > > > file="d:\inetpub\wwwroot\thedirectory\myfile.zip "> > > The file is there and the path is correct. I can download the file > directly by typing in http://mysite.com/thedirectory/myfile.zip > in the browser, but whenever I try to use CFHEADER to serve the files > it just spins (even though it's in a CFTRY it does not thrown an error). When > I abort (exit the spinning page) I get a diagnostic dump: > > Java heap space null > The error occurred on line -1. > > What the heck? I I doing something wrong? I realize your question has already been answered - and for the record, I like Ben Nadel's solution to this very much - but I have a related question for you. If you're serving files in your web root, why are you bothering to use CFCONTENT to serve them? Just serve a link to the file in question, and let the web server do the work. If there's some business reason why you don't want to do that, you probably shouldn't store the files in a web-accessible directory. 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, 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:351737 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFHeader Problem
Sorry. I didn't realize it was solved. It would help to not change the subject of the thread ;-) On 6/26/12 10:26 PM, "Bobby" wrote: > >Which CF Version? What is the file size of myfile.zip? And how much memory >is allocated to CF? > > >On 6/26/12 11:08 AM, "Robert Harrison" wrote: > >> >>According to the documentation the default is "yes". >> >> >>Robert Harrison >>Director of Interactive Services >> >>Austin & Williams >>Advertising I Branding I Digital I Direct >>125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 >>T 631.231.6600 X 119 F 631.434.7022 >>http://www.austin-williams.com >> >>Blog: http://www.austin-williams.com/blog >>Twitter: http://www.twitter.com/austin_williams >> >> >>-Original Message- >>From: >>Sent: Tuesday, June 26, 2012 11:04 AM >>To: cf-talk >>Subject: Re: CFHeader Problem >> >> >> >>What's wrong with the below? >> >>Don't you need RESET="yes" inside the CFCONTENT tag? >> >> >> >> > > ~| 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:351734 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFHeader Problem
Which CF Version? What is the file size of myfile.zip? And how much memory is allocated to CF? On 6/26/12 11:08 AM, "Robert Harrison" wrote: > >According to the documentation the default is "yes". > > >Robert Harrison >Director of Interactive Services > >Austin & Williams >Advertising I Branding I Digital I Direct >125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 >T 631.231.6600 X 119 F 631.434.7022 >http://www.austin-williams.com > >Blog: http://www.austin-williams.com/blog >Twitter: http://www.twitter.com/austin_williams > > >-Original Message----- >From: >Sent: Tuesday, June 26, 2012 11:04 AM >To: cf-talk >Subject: Re: CFHeader Problem > > > >>What's wrong with the below? > >Don't you need RESET="yes" inside the CFCONTENT tag? > > > > ~| 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:351733 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFHeader Problem
> What's wrong with the below? > > > file="d:\inetpub\wwwroot\thedirectory\myfile.zip "> > > The file is there and the path is correct. I can download the file directly > by typing in http://mysite.com/thedirectory/myfile.zip > in the browser, but whenever I try to use CFHEADER to serve the files it just > spins (even though it's in a CFTRY it does not > thrown an error). When I abort (exit the spinning page) I get a diagnostic > dump: > > Java heap space null > The error occurred on line -1. > > What the heck? I I doing something wrong? I realize your question has already been answered - and for the record, I like Ben Nadel's solution to this very much - but I have a related question for you. If you're serving files in your web root, why are you bothering to use CFCONTENT to serve them? Just serve a link to the file in question, and let the web server do the work. If there's some business reason why you don't want to do that, you probably shouldn't store the files in a web-accessible directory. 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, 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:351732 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFHeader Problem: SOLVED (sort of)
I believe you can get round this by using a but of java code instead of cfheader. It has more than likely been documented on this list before as well as blogs. Regards Russ Michaels On Jun 26, 2012 5:41 PM, "Robert Harrison" wrote: > > Apparently the problem with cfheader is a file size issue. As of CF9, it > seems to load the entire file into memory before downloading it, so if the > file is too large you get the out of memory. Apparently this was not a > problem in previous CF Releases, which explains why this used to work and > started giving me issue on the newer sites. > > To fix this you can increase the JVM Heap Size max, or you can use the > solution provided by Ben Nadel at > http://www.bennadel.com/blog/1227-Using-ColdFusion-To-Stream-Files-To-The-Client-Without-Loading-The-Entire-File-Into-Memory.htm > > From what I read this was not a problem before CF9. Apparently Adobe > changed CFHEADER to load the entire file into memory at CF9 time. In > http://forums.adobe.com/message/3448331 it seems that Adobe acknowledged > this was a bug in October 2010 and said they were looking into it. I guess > they are still looking. > > For now, increasing the Java Heap Size Max has solved the problem. > > Robert Harrison > Director of Interactive Services > > Austin & Williams > Advertising I Branding I Digital I Direct > 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 > T 631.231.6600 X 119 F 631.434.7022 > http://www.austin-williams.com > > Blog: http://www.austin-williams.com/blog > Twitter: http://www.twitter.com/austin_ > > ~| 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:351729 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFHeader Problem: SOLVED (sort of)
Apparently the problem with cfheader is a file size issue. As of CF9, it seems to load the entire file into memory before downloading it, so if the file is too large you get the out of memory. Apparently this was not a problem in previous CF Releases, which explains why this used to work and started giving me issue on the newer sites. To fix this you can increase the JVM Heap Size max, or you can use the solution provided by Ben Nadel at http://www.bennadel.com/blog/1227-Using-ColdFusion-To-Stream-Files-To-The-Client-Without-Loading-The-Entire-File-Into-Memory.htm >From what I read this was not a problem before CF9. Apparently Adobe changed >CFHEADER to load the entire file into memory at CF9 time. In >http://forums.adobe.com/message/3448331 it seems that Adobe acknowledged this >was a bug in October 2010 and said they were looking into it. I guess they are >still looking. For now, increasing the Java Heap Size Max has solved the problem. Robert Harrison Director of Interactive Services Austin & Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_ ~| 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:351719 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFHeader Problem
According to the documentation the default is "yes". Robert Harrison Director of Interactive Services Austin & Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams -Original Message- From: Sent: Tuesday, June 26, 2012 11:04 AM To: cf-talk Subject: Re: CFHeader Problem >>What's wrong with the below? Don't you need RESET="yes" inside the CFCONTENT tag? ~| 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:351715 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFHeader Problem
>>What's wrong with the below? Don't you need RESET="yes" inside the CFCONTENT tag? ~| 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:351714 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader Content-Range
> Using cffile read? Is 1 character considered to be a "byte"? Usually, a character is one byte in size, but you can use the READBINARY action value instead, and use ToBase64 to serve it. 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:349446 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader Content-Range
> CF isn't going to know anything about your range headers. It's just > going to serve the file. If you wanted to serve part of the file, > you'd have to read it into memory and serve the slice that you want > to > serve. Using cffile read? Is 1 character considered to be a "byte"? ~| 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:349444 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader Content-Range
> I have come up with a solution but it is not working 100%. It seems like the > Content-Range header is not working. I return the correct Content-Length, > but it always starts at the beginning of the file. See code below... > > ... > > CF isn't going to know anything about your range headers. It's just going to serve the file. If you wanted to serve part of the file, you'd have to read it into memory and serve the slice that you want to serve. 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 onsi ~| 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:349439 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader Content-Range
I have come up with a solution but it is not working 100%. It seems like the Content-Range header is not working. I return the correct Content-Length, but it always starts at the beginning of the file. See code below... ~| 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:349424 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader Content-Range
> Does anyone know how to get Content-Range returned as a header response when > the request has "Range: bytes= " in it? > I added but do not get the >Content-Range back. CF, like most application servers in my experience, will not honor things like this - request headers that control behavior, HTTP verbs that control behavior, etc. It's up to the developer to do this. You would have to read the range in the request, and generate a response to serve just that range, and return the appropriate headers, etc, yourself. A common example of this that I run into all the time is the use of Last-Modified in HTTP responses, and support for If-Modified-Since HTTP request headers. 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 onsit ~| 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:349305 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfheader filename
>> Is there a way to serve content via a .cfm file... >> >> >> If you click Save As it want's to save it as "serve.cfm.htm" We always force a download by setting the mime type to "application/unknown" because you can never tell how the browser will respond to the "correct" mime type. Many times people running Windows have inadvertently reassigned the application type and it may open in a program they really don't want. This forces a download since the browser doesn't know what else to do with it. 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 ~| 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:344968 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters [spamtrap bayes][spamtrap heur]
On 2/24/2011 1:48 AM, =?ISO-8859-1?Q?Claude_Schn=E9egans wrote: > for editors which recognize BOMs, probably, but this suppose a Unicode aware > editor. even notepad is "unicode aware". these days only Luddites refuse unicode as default. ~| 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:342534 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
>>in the presence of a BOM it can guess fairly accurately. for editors which recognize BOMs, probably, but this suppose a Unicode aware editor. ~| 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:342533 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
On 2/23/2011 10:42 PM, =?ISO-8859-1?Q?Claude_Schn=E9egans wrote: > will assume when it opens the file. There are no ways this can be decided by > the application which creates the file. it can guess & in the presence of a BOM it can guess fairly accurately. ~| 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:342530 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters [spamtrap bayes][spamtrap heur]
>>in which format it is the file is in some proprietary format ... oops, I mean "in which format the file is if it is in some proprietary format..." ~| 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:342527 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters [spamtrap bayes][spamtrap heur]
>>no, these are not equivalent. windows 1252 is a superset of iso-8859-1. I meant equivalent in the general meaning "not quite identical". >>if a text editor/cf is told or can guess the encoding it will read it >>successfully. This is the point. The text editor can be "told" by the file in which format it is the file is in some proprietary format, like MS Word, RTF, or even HTML but not in plain .txt. A text file cannot tell in which format it is, it is suppose to be and can only be in ASCII, even if this ASCII is used as a base to encode some other format. Then all depends on what format the text editor will assume when it opens the file. There are no ways this can be decided by the application which creates the file. ~| 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:342526 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters [spamtrap bayes][spamtrap heur]
On 2/23/2011 9:12 PM, =?ISO-8859-1?Q?Claude_Schn=E9egans wrote: > If it contains special characters above 127, they will be interpreted in the > default character set of the operating system. unless there's a BOM. > For instance under Windows, il will probably be Window 1252 equivalent to ISO > 8859-1, ie. R�publique. no, these are not equivalent. windows 1252 is a superset of iso-8859-1. > If it is actually encoded in UTF-8, it will still be read as plain ASCII > characters, thus things like R�publique. not sure what to make of this, by "it" you mean the OS? or some text editor/cf? if a text editor/cf is told or can guess the encoding it will read it successfully. ~| 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:342519 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
>>I'm trying to save a text file that has foreign characters. You simply cannot specify a charset in a plain .txt file. A text file is simply a string of characters in ASCII. Unlike an HTML page, it does not contain any header to specify a character set. If it contains special characters above 127, they will be interpreted in the default character set of the operating system. For instance under Windows, il will probably be Window 1252 equivalent to ISO 8859-1, ie. République. If the OS does not consider characters above 127, it will show an ? for every character above 127, ie. R?publique On an Apple computer, it will be different. If it is actually encoded in UTF-8, it will still be read as plain ASCII characters, thus things like République. ~| 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:342514 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
On Tue, Feb 22, 2011 at 10:42 PM, Richard Steele wrote: > I'm trying to save a text file that has foreign characters. If you want to instruct the browser to save a file instead of trying to render it to the user, you need to set a content disposition in combination with a MIME type of application/octet-stream. See RFC 2616 19.5.1. Once your file is placed on the harddisk of the client computer, it is up to the used application on the client computer to infer what charset is in it. Some applications will just presume it is the environment charset, some will presume it is a specific one (like ISO-8859-1), some will try to do some logic. You may be able to help that last category by making sure there is a BOM in your file: http://unicode.org/faq/utf_bom.html#bom10 Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| 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:342508 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters [spamtrap bayes][spamtrap heur]
On 2/23/2011 4:42 AM, Richard Steele wrote: > uh, is this text actually utf-8 (ie what editor, etc did you use to create this page)? because your code works fine (well with cfoutput added) from cfbuilder. ~| 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:342507 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
Meant to say Firefox for the PC. Thanks again. ~| 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:342502 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
TextEdit 1.6 shows RÃpublique Word:MAC 2011 v14.02 shows: RÎpublique On Tue, Feb 22, 2011 at 7:27 PM, Richard Steele wrote: > > That's totally it. Apple Chrome, Safari and Firefox show RÃpublique when I > click your link. IE 8 and Firefox PC show République. It shows it this in > both Word 2011 and Text Edit on the Mac. Plain text endcoding is set to > Automatic for Plain Text in Text Edit and utf-8 for html documents. > > Anyway, we'll just use Safari for the PC to run the cfm that produces this. > > Thanks for your patience and help! > > > > ~| 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:342501 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
FWIW: I get RÈpublique. Mac OSX Leopard. Chrome 9.0.597 (not that this should matter since it's a d.l. not an open in the browser. Also checked FF 3.316 with same result. On Tue, Feb 22, 2011 at 7:20 PM, Alan Rother wrote: > > What kind of computer (OS) are you on and what browser are you using? I > just > want to Apples to Apples this... This should be really simple... > > Oh and what program is the browser opening the text file in. > > Leigh (as always) is right, this should just work > > On Tue, Feb 22, 2011 at 5:07 PM, Richard Steele wrote: > > > > > >That odd, it totally worked for me... > > > > > >http://alan.rotherfamily.net/demos/utf8/ > > > > > > > > > > > > > I get RÈpublique when I click your link. not République. > > > > > > ~| 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:342500 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
That's totally it. Apple Chrome, Safari and Firefox show RÈpublique when I click your link. IE 8 and Firefox PC show République. It shows it this in both Word 2011 and Text Edit on the Mac. Plain text endcoding is set to Automatic for Plain Text in Text Edit and utf-8 for html documents. Anyway, we'll just use Safari for the PC to run the cfm that produces this. Thanks for your patience and help! ~| 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:342499 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
What kind of computer (OS) are you on and what browser are you using? I just want to Apples to Apples this... This should be really simple... Oh and what program is the browser opening the text file in. Leigh (as always) is right, this should just work On Tue, Feb 22, 2011 at 5:07 PM, Richard Steele wrote: > > >That odd, it totally worked for me... > > > >http://alan.rotherfamily.net/demos/utf8/ > > > > > > > > I get RÈpublique when I click your link. not République. > > ~| 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:342498 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
>That odd, it totally worked for me... > >http://alan.rotherfamily.net/demos/utf8/ > > > I get RÈpublique when I click your link. not République. ~| 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:342497 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
No, I get this: R?publique ~| 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:342496 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
That odd, it totally worked for me... http://alan.rotherfamily.net/demos/utf8/ #xOutput# On Tue, Feb 22, 2011 at 4:10 PM, Richard Steele wrote: > > Hi Alan, closer, but now I get R?publique. Any other ideas would be greatly > appreciated. > > > ~| 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:342495 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
Should work fine with just a plain vanilla cfcontent / cfoutput #xOutput# ~| 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:342494 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
Hi Alan, closer, but now I get R?publique. Any other ideas would be greatly appreciated. ~| 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:342493 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
I tried this: Still no foreign characters. ~| 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:342492 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
Do this #xOutput# On Tue, Feb 22, 2011 at 3:00 PM, Leigh wrote: > > Are you supplying a content type too "text/plain", "text/html"? > > > > > > ~| 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:342491 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and foreign characters
Are you supplying a content type too "text/plain", "text/html"? ~| 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:342490 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFHEADER on Chrome to download an Excel CSV / Mime Type problem FIXED
We fixed it! Turned out to be a missing quote around the filename, this works: Brook -Original Message- From: Rick Root [mailto:rick.r...@gmail.com] Sent: December-06-10 10:50 AM To: cf-talk Subject: Re: CFHEADER on Chrome to download an Excel CSV / Mime Type problem Have you tried using this mime type instead? application/msexcel On Mon, Dec 6, 2010 at 1:42 PM, Brook Davies wrote: > > I've been using the following code for years with no problems on > IE,FF,Safari to force the download of a CSV file that will be associated > with and opened by Excel: > > value="attachment;filename=""myExport.csv" charset="utf-8"> > > > However, this code in Chrome results in the actual template filename being > used without any association (ie. Download.cfm gets pushed to the user). I > can get a straight up XLS file to be downloaded and recognized by Chrome, > but no dice on the CSV formatted excel document. Has anyone got this to > work > in Chrome? I have of course googled this and not been able to find anything > that works... > > Brook > > > > ~| 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:339828 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFHEADER on Chrome to download an Excel CSV / Mime Type problem
That works in every other browser (that I tested..) except Chrome. Chrome just downloads the CFM template... -Original Message- From: Rick Root [mailto:rick.r...@gmail.com] Sent: December-06-10 10:50 AM To: cf-talk Subject: Re: CFHEADER on Chrome to download an Excel CSV / Mime Type problem Have you tried using this mime type instead? application/msexcel On Mon, Dec 6, 2010 at 1:42 PM, Brook Davies wrote: > > I've been using the following code for years with no problems on > IE,FF,Safari to force the download of a CSV file that will be associated > with and opened by Excel: > > value="attachment;filename=""myExport.csv" charset="utf-8"> > > > However, this code in Chrome results in the actual template filename being > used without any association (ie. Download.cfm gets pushed to the user). I > can get a straight up XLS file to be downloaded and recognized by Chrome, > but no dice on the CSV formatted excel document. Has anyone got this to > work > in Chrome? I have of course googled this and not been able to find anything > that works... > > Brook > > > > ~| 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:339825 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFHEADER on Chrome to download an Excel CSV / Mime Type problem
Have you tried using this mime type instead? application/msexcel On Mon, Dec 6, 2010 at 1:42 PM, Brook Davies wrote: > > I've been using the following code for years with no problems on > IE,FF,Safari to force the download of a CSV file that will be associated > with and opened by Excel: > > value="attachment;filename=""myExport.csv" charset="utf-8"> > > > However, this code in Chrome results in the actual template filename being > used without any association (ie. Download.cfm gets pushed to the user). I > can get a straight up XLS file to be downloaded and recognized by Chrome, > but no dice on the CSV formatted excel document. Has anyone got this to > work > in Chrome? I have of course googled this and not been able to find anything > that works... > > Brook > > > > ~| 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:339822 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfheader/cfheader not working as expected
I don't remember if you posted any code, but I get by this with the following: Before All that I build the spreadsheet and put it into Variables.mySpreadsheetVar. What version of CF are you on? Are you using HTML, CFSpreadsheet, or some other method to generate the spreadsheet? I had an issue similar to what you had before, but I started building the spreadsheets using POI then when they get pushed to the browser they are in true spreadsheet format instead of html pretending to be xls (or xlsx). Sometimes the browser would see the xls extension but would then check the content and see html and act weirdly. By using the poi I not only get rid of those problems but it also got rid of the Excel "Not in the same format" popup. If you can consider this option let me know and I may be able to help a little. Also, do you have access to the server itself? I upgraded the POI that comes with ColdFusion to the latest version and I can do a lot more extra stuff. Steve -Original Message- From: Robert Gallagher [mailto:robert.gallag...@honeywell.com] Sent: Tuesday, November 09, 2010 5:35 PM To: cf-talk Subject: Re: cfheader/cfheader not working as expected I truly understand what you're saying but how these things work it not consistent which is frustrating. What's really crazy is we have dozens of Excel download links in our various apps like this example and some work perfectly with "value=inline" but most have the undesirable behavior (code name and read-only) which actually still works. Why "inline" provides the dialog box option of remembering the download decision but using "attachment" does not give that option (at least in IE) is very inconsistent but not surprising. Since this is not earth shattering I will chalk this up to browser inconsistency and move 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:339075 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
I truly understand what you're saying but how these things work it not consistent which is frustrating. What's really crazy is we have dozens of Excel download links in our various apps like this example and some work perfectly with "value=inline" but most have the undesirable behavior (code name and read-only) which actually still works. Why "inline" provides the dialog box option of remembering the download decision but using "attachment" does not give that option (at least in IE) is very inconsistent but not surprising. Since this is not earth shattering I will chalk this up to browser inconsistency and move 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:339055 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
> Let me refine this a little more. IE6 (the company browser) treats "inline" > versus "attachment" slightly different as far as the Open/Save dialog > box is concerned. "Attachment" *FORCES* the user to always choose open or > save. "Inline" allows the user to permanently select Open for > example, but then opens it with the wrong name and Read-Only. That last part > is the irritating part. If IE handled it like Firefox then this > discussion would be moot. Right. But you don't have any control over that from the server in either case. The "inline" behavior makes sense - you download HTML pages all the time in a browser and you can't change their name (without Save As ...) or edit them on the server by default. 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:338991 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
> On 11/8/2010 9:55 AM, Robert Gallagher wrote: > > Using "attachment" forces the user to make a selection on a dialog > box and I wanted to bypass that dialog box and have the file open > every time. > > > You do not get to make that choice. It is *MY* computer and *MY* > browser and *I* get to say what happens to any content you choose to > send me. > > > > Let me refine this a little more. IE6 (the company browser) treats "inline" versus "attachment" slightly different as far as the Open/Save dialog box is concerned. "Attachment" *FORCES* the user to always choose open or save. "Inline" allows the user to permanently select Open for example, but then opens it with the wrong name and Read-Only. That last part is the irritating part. If IE handled it like Firefox then this discussion would be moot. ~| 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:338990 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
You don't get such a granular level of control in the web environment, only in the desktop arena. On Mon, Nov 8, 2010 at 12:55 PM, Robert Gallagher < robert.gallag...@honeywell.com> wrote: > > > > > > > Change "inline" to "attachment" so that the browser knows this is a > > separate, attached file to view OR download AND NOT an inline part of > > the currently viewed file: test.cfm. > > Using "attachment" forces the user to make a selection on a dialog box and > I wanted to bypass that dialog box and have the file open every time. > > ~| 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:338958 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
On 11/8/2010 9:55 AM, Robert Gallagher wrote: > Using "attachment" forces the user to make a selection on a dialog box and I > wanted to bypass that dialog box and have the file open every time. You do not get to make that choice. It is *MY* computer and *MY* browser and *I* get to say what happens to any content you choose to send me. ~| 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:338957 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
> Using "attachment" forces the user to make a selection on a dialog box and I > wanted to bypass that dialog box and have the file open every > time. For obvious security reasons, you generally can't make things happen on a client's machine from the web server. You can provide suggestions to the client (such as the proper disposition of content) but that's it. If you need programs to automatically open, etc, you need client-side functionality (ActiveX, Java, AIR, etc) to make that happen. 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:338956 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
> > > Change "inline" to "attachment" so that the browser knows this is a > separate, attached file to view OR download AND NOT an inline part of > the currently viewed file: test.cfm. Using "attachment" forces the user to make a selection on a dialog box and I wanted to bypass that dialog box and have the file open every time. ~| 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:338954 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader/cfheader not working as expected
Change "inline" to "attachment" so that the browser knows this is a separate, attached file to view OR download AND NOT an inline part of the currently viewed file: test.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:338882 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and pushing a file to the user
On 10/18/2010 7:53 PM, Michael Grant wrote: > > > I had that actually - not using the "type" though as there's a number of different file types available. Turns out it was related to the server issue that was causing a query weirdness I was asking about earlier where the two below statements were giving different results... WHERE (paID=) AND (nl_status = 'published' OR nl_status = 'archive WHERE paID= AND (nl_status = 'published' OR nl_status = 'archive Restarted the server - all is good. Hmmm... ~| 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:338319 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and pushing a file to the user
On Mon, Oct 18, 2010 at 4:48 PM, Les Mizzell wrote: > > I've got a section of a site where a user can access a number of logo > downloads, including tiff, jpeg, ai, or gif formats. > > There are thumbs on the download page, with links on each thumb like: > > > > This takes them to the resource_download processing page (located in the > same directory as the files to be downloaded), which runs a query to > record which logo they downloaded along with a date/time stamp. > > What is supposed to happen next is that the selected file is pushed to > them so they can save it. This is where I'm having problems. > > So, after the query runs: > > NAME="content-disposition" >value="attachment; >filename=#get.logo#"> > > Looks correct so far... > > But, let's say I selected a jpg. The dialog comes up ("SAVE" or "OPEN"), > I select "SAVE", and when I try to open the file in Photoshop I get an > error "Could not complete your request because a JPEG marker segment > length is too short. The file may be truncated or incomplete. > > If I just tell it to "OPEN" the file instead of saving - I get a blank doc. > > If I grab the file FTP from the server, it seems to be fine and > saves/opens properly. > > What's wrong here? Suggestions? > > > > > > ~| 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:338309 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader and pushing a file to the user
> I've got a section of a site where a user can access a number of logo > downloads, including tiff, jpeg, ai, or gif formats. > > There are thumbs on the download page, with links on each thumb like: > > > > This takes them to the resource_download processing page (located in the > same directory as the files to be downloaded), which runs a query to > record which logo they downloaded along with a date/time stamp. > > What is supposed to happen next is that the selected file is pushed to > them so they can save it. This is where I'm having problems. > > So, after the query runs: > > NAME="content-disposition" > value="attachment; > filename=#get.logo#"> > > Looks correct so far... > > But, let's say I selected a jpg. The dialog comes up ("SAVE" or "OPEN"), > I select "SAVE", and when I try to open the file in Photoshop I get an > error "Could not complete your request because a JPEG marker segment > length is too short. The file may be truncated or incomplete. > > If I just tell it to "OPEN" the file instead of saving - I get a blank doc. You have a CFCONTENT after the CFHEADER to actually serve the file, right? CFHEADER doesn't actually serve the file. 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 o ~| 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:338305 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfheader to create post data.
CFHEADER amends the headers of the server response. Post data would be part of client request instead. For CF to make a client request you'd have to use CFHTTP type Post, and use CFHTTPPARAM to send the post data, i.e. type=file. On Thu, May 7, 2009 at 9:26 AM, Ian Skinner wrote: > > Can one create post data with cfheader? If so, what might the syntax > look like? > > > -- Steven Erat Webapper Services, LLC. http://www.webapper.com/ ~| 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:322272 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFHeader - appending date to xls file name
> value="filename=ResolveIT_List#Now()#.xls"> > > > > #FirstName# > #LastName# > #Email# > #Address1# > #City# > #State# > #Zip# > > > > value="filename=MyFiles#DateFormat(TheDate, > 'mm-dd-yy')#.xls"> First, you can't embed one CFML tag within another. If an attribute value of a CFML tag contains an expression wrapped in hashes, it will automatically output to the string used for the attribute value. Bad: Good: Second, you can't specify multiple Content-Distribution headers within the same document. I'm not sure if that's what you're doing, but you do have two of them in your code sample. 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 inf ~| 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:320939 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFHEADER
>> Shouldn't be filename=#FILENAME# ? Surprising it works with Firefox and IE 7. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:293587 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfheader filename problem
Duh! Thanks Ben. You know it's really Bobby's job to make me feel stupid :) -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 18, 2007 4:52 PM To: CF-Talk Subject: RE: cfheader filename problem Try wrapping the filename in single quotes: ... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ ~| 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:284064 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfheader filename problem
Actually double quotes are ok too (probably preferable), as per the example in the spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html You'd need to escape the double quotes: ""some file.etx"" Some sort of quote is necessary in any case, as the spec states that a quoted string is expected for the filename: - content-disposition = "Content-Disposition" ":" disposition-type *( ";" disposition-parm ) disposition-type = "attachment" | disp-extension-token disposition-parm = filename-parm | disp-extension-parm filename-parm = "filename" "=" quoted-string disp-extension-token = token disp-extension-parm = token "=" ( token | quoted-string ) An example is Content-Disposition: attachment; filename="fname.ext" - On 7/19/07, Ben Nadel <[EMAIL PROTECTED]> wrote: > Try wrapping the filename in single quotes: > > value="attachment;filename='#fileName#'"> > > > .. > Ben Nadel > Certified Advanced ColdFusion MX7 Developer > www.bennadel.com > > Need ColdFusion Help? > www.bennadel.com/ask-ben/ > > -Original Message- > From: Dave Francis [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 18, 2007 1:23 PM > To: CF-Talk > Subject: cfheader filename problem > > Hi, > > I'm trying to download files with this: > > > > value="attachment;filename=#fileName#"> > > > > > > Whenever the filename contains spaces, the "What do you want > to do with this file" prompt truncates the filename. I can obviously > replace the spaces with underscore, %20 or something, but wondered if > there was a way to preserve the filename as is, and get the full name in > the prompt? > > ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284059 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfheader filename problem
Dave, I am not totally sure here but I think replacing it with %20 would be the only way to keep it from truncating. I think the truncating is happening on the browser side. -Randy Dave Francis wrote: > Hi, > > I'm trying to download files with this: > > > > > > > > > > Whenever the filename contains spaces, the "What do you want to > do with this file" prompt truncates the filename. I can obviously replace > the spaces with underscore, %20 or something, but wondered if there was a > way to preserve the filename as is, and get the full name in the prompt? > > > > > > > > ~| 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:284047 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfheader filename problem
Try wrapping the filename in single quotes: .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 18, 2007 1:23 PM To: CF-Talk Subject: cfheader filename problem Hi, I'm trying to download files with this: Whenever the filename contains spaces, the "What do you want to do with this file" prompt truncates the filename. I can obviously replace the spaces with underscore, %20 or something, but wondered if there was a way to preserve the filename as is, and get the full name in the prompt? ~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284043 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CFHeader No Cache Sanity Check
> Is there a reason to set http-equiv meta tags when you are > setting the actual headers already? Yes. Some (arguably broken) proxies may disregard HTTP response headers. 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! ~| 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:266213 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFHeader No Cache Sanity Check
Use the cfheaders and remove the meta tags. On 1/11/07, Mark Leder <[EMAIL PROTECTED]> wrote: > Don't know. If they are of equal value I suppose one or more should be > deleted. But which one(s)? > > -Original Message- > From: James Holmes [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 10, 2007 5:43 PM > To: CF-Talk > Subject: Re: CFHeader No Cache Sanity Check > > Is there a reason to set http-equiv meta tags when you are setting the > actual headers already? > > > > > > ~| 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:266210 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CFHeader No Cache Sanity Check
Don't know. If they are of equal value I suppose one or more should be deleted. But which one(s)? -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 10, 2007 5:43 PM To: CF-Talk Subject: Re: CFHeader No Cache Sanity Check Is there a reason to set http-equiv meta tags when you are setting the actual headers already? ~| 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:266209 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFHeader No Cache Sanity Check
Is there a reason to set http-equiv meta tags when you are setting the actual headers already? On 1/11/07, Mark Leder <[EMAIL PROTECTED]> wrote: > I don't know if its just me or the code I've used for a while, but seems > like since the first of this year (or thereabouts) IE (6 or 7) seems to > ignore page caching instructions and caches pages. (I'm not seeing this > behavior in FF). Wondering if a MS Patch has caused a problem or if others > have noticed any changes. -- CFAJAX docs and other useful articles: http://www.bifrost.com.au/blog/ ~| 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:266196 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfheader breaks my xml
Hey Andy - I just spent the better part of the day (I'm embarrassed to admit) debugging a problem I was having with one of my XML AJaX requests that used the code I included in this thread. Although I looked at every other piece of code before I got there, it ended up being an omission in this code so I thought I'd update the list (and its archives) with what I found. Short version: I was trying to return XML for parsing via JavaScript. What I wasn't doing, though, was specifying the character set for that returning XML. Once my returning XML contained so much as an accented "e" the functionality failed catastrophically. To save anyone else the time and frustration, this fixed the problem: ...myXML... Moral: Be smarter than I am and ALWAYS specify a character set. On 3/30/06, Andy Jarrett <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having some trouble create a valid XML document using cfheader to > change the page content. > > My simple file looks like this: > > xml.cfm > > > > > 1 > > > > I open this up and its valid. I know change the content type so the > file is passed as XML: > > > > > > 1 > > > > This breaks the page. It seems that adds three blank lines > to the top of the page. > > Has anyone else come across this problem? > > Cheers, > > Andy > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237036 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: cfheader breaks my xml
Cheers back. Judging by the sheer quantity of bangs, I assume that worked for you. On 3/30/06, Andy Jarrett <[EMAIL PROTECTED]> wrote: > cheers rob > > > > On 30/03/06, Rob Wilkerson <[EMAIL PROTECTED]> wrote: > > I'm not sure if this is relevant because I'm not sure how you're using > > your XML, but I use instead of and it works > > great: > > > > > > > > ...myXML... > > > > > > On 3/30/06, Andy Jarrett <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I'm having some trouble create a valid XML document using cfheader to > > > change the page content. > > > > > > My simple file looks like this: > > > > > > xml.cfm > > > > > > > > > > > > > > > 1 > > > > > > > > > > > > I open this up and its valid. I know change the content type so the > > > file is passed as XML: > > > > > > > > > > > > > > > > > > 1 > > > > > > > > > > > > This breaks the page. It seems that adds three blank lines > > > to the top of the page. > > > > > > Has anyone else come across this problem? > > > > > > Cheers, > > > > > > Andy > > > > > > > > > > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236539 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: cfheader breaks my xml
cheers rob On 30/03/06, Rob Wilkerson <[EMAIL PROTECTED]> wrote: > I'm not sure if this is relevant because I'm not sure how you're using > your XML, but I use instead of and it works > great: > > > > ...myXML... > > > On 3/30/06, Andy Jarrett <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm having some trouble create a valid XML document using cfheader to > > change the page content. > > > > My simple file looks like this: > > > > xml.cfm > > > > > > > > > > 1 > > > > > > > > I open this up and its valid. I know change the content type so the > > file is passed as XML: > > > > > > > > > > > > 1 > > > > > > > > This breaks the page. It seems that adds three blank lines > > to the top of the page. > > > > Has anyone else come across this problem? > > > > Cheers, > > > > Andy > > > > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236538 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: cfheader breaks my xml
I'm not sure if this is relevant because I'm not sure how you're using your XML, but I use instead of and it works great: ...myXML... On 3/30/06, Andy Jarrett <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having some trouble create a valid XML document using cfheader to > change the page content. > > My simple file looks like this: > > xml.cfm > > > > > 1 > > > > I open this up and its valid. I know change the content type so the > file is passed as XML: > > > > > > 1 > > > > This breaks the page. It seems that adds three blank lines > to the top of the page. > > Has anyone else come across this problem? > > Cheers, > > Andy > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236531 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: cfheader/cfcontent, auto-downloading a file, and IE woes
Let me guess, the users reporting this are on XP SP2? And maybe, not sure, you're in a frame? If I'm remembering right, it's a known bug in IE on that version of windows. And if I'm remembering right again, the only solution we came up with was to set the target for your download to window.parent.name. Don't know why this helps; we just bushwacked, trying to get IE to not be thinking about that window. HTH, sorry to be vague. Dave Merrill > Got a stumper here (at least on my end). > > In my main project, I've got a page that is basically a DB table > exporter - user specifies what fields, some filtering options, etc. The > system then creates a text file, and then pushes the page over to a page > with cfheader/cfcontent, to pop the file-placement window prompt on the > user's machine. > > Works fine in Mozilla - but in IE (6, at least), whenever the prompt > window pops up, and you choose where to put the file, the main IE > browser window vanishes. > > I don't think there's any odd JS code in my pages as a whole that's > causing this; one would think the same behavior would occur in Mozilla. > > Any thoughts? > --Scott ~| 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:204852 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: cfheader/ cfcontent to server files
> From: Dave Watts [mailto:[EMAIL PROTECTED] > Once you use CFCONTENT to serve a file, that file is what > will be sent to the browser. If the user chooses to cancel > the download, the browser is in charge of figuring out how to > present that information to the user. How do others do it? Take the user to a download page instead of serving the file directly? My end-users want everything in their email messages... Maybe I will just have to toss in a little something different. ~| 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:192646 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: cfheader/ cfcontent to server files
> I have a link to a CF template that serces up a document for > download. When the user clicks on it they are asked to save/open/cancel > the file... which is fine. However the web page that opens up > beneath the dialogue box is blank ("Action Cancelled"). I > assum this happens since cfheader affects the page... what is > a better approach to this to keep the download prmpt while > getting the underlying page to not bomb. Once you use CFCONTENT to serve a file, that file is what will be sent to the browser. If the user chooses to cancel the download, the browser is in charge of figuring out how to present that information to the user. You may be able to build a frames-based workaround. 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! ~| 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:192639 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: Cfheader and browser window name
> I was wondering if it is possible to change ( or hide) the > name of the actual file (displayed at the top of the browser > window) when the new browser window is called like: > > value="application/vnd.ms-excel"> name="Content-Disposition" value="inline; filename=excel.xls"> > > The new browser window opens correctly and shows the output > in Excel but the window shows the actual cfm file name. No, you can't do that. However, you could launch the download page from another page using JavaScript client-side redirection. This would let you show the HTML title of the first page in the title bar of the browser. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=37 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182991 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: cfheader question
I think you are on the right track with the JS. As far as I understand it, popup blockers don't block popups if they are created directly from a link (I could be wrong here). So this could do it:
function timedreload(inRes) {
win = window.open("index.cfm?pgid=download&resID=" +
inRes,"download","width=10,height=10,scrollbars=0,resizable=0");
setTimeout("window.location.reload();",6100);
setTimeout("win.close();",6000);
}
You have to assign the new window to a variable (win) in order to be able to close it later. Also, if you reload the page, it can't close the popup anymore. So you will have to close the popup first and then reload the page. I have tested none of this. Alternatively, you could just call the download page in the href and schedule a JS reload in the onclick >
function timedreload() {
setTimeout("window.location.reload();",3000);
}
This way you don't have a popup and the page still reloads. Pascal > -Original Message- > From: Steve Logan [mailto:[EMAIL PROTECTED] > Sent: 18 September 2004 15:41 > To: CF-Talk > Subject: [Spam?] cfheader question > > On a site that I'm working on, there's a lot of MS Word documents > available to download. Instead of letting IE open the document in a > window, I have a download.cfm page that uses cfheader to force the > document to download. > > Unfortunately, I can't figure out how to get the previous page that the > link was called from to reload, which updates the list of available > documents and removes the one that was just downloaded. > > What I need to get to happen is documents.cfm be automatilly refreshed / > reloaded after clicking on the link to start the download. > > I'm assuming there's now way to put anything else on the download.cfm page > just as _javascript_ or a cflocation that would force the documents.cfm page > to download because of the cfheader tag. > > The other method I'm working on is close - but uses _javascript_ to open a > window - which could cause problems with pop-up blockers. > > The link for the document to download is: > > > > > And then the _javascript_ is: > >
> function timedreload(inRes) {
> window.open("index.cfm?pgid=download&resID=" +
> inRes,"download","width=10,height=10,scrollbars=0,resizable=0");
> setTimeout("window.location.reload();",3000);
> setTimeout("window.close.download;",6000);
> }
> > > Problem here is that the download window doesn't want to close > automatically, and, it uses a pop-up which could cause problems with pop- > up blockers. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CFHeader in a custom tag
> Hi all, > > I have another strange one for you. I'm writing a custom tag and I want it > to do a cfheader. I can do this no problem, but what I'm looking to do is > have it so if I call the tag more than once in a page, the cfheader is only > done on the first call. > > Any ideas how I might get it to do this? Inside the custom tag: -- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CFHeader in a custom tag
code here add header here Something like that... HTH, -- Howie Hamlin - inFusion Project Manager On-Line Data Solutions, Inc. - www.CoolFusion.com inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server PrismAV - Virus scanning for ColdFusion applications >>> Find out how iMS Stacks up to the competition: http://www.coolfusion.com/imssecomparison.cfm - Original Message - From: DURETTE, STEVEN J (AIT) To: CF-Talk Sent: Thursday, August 26, 2004 4:36 PM Subject: CFHeader in a custom tag Hi all, I have another strange one for you. I'm writing a custom tag and I want it to do a cfheader. I can do this no problem, but what I'm looking to do is have it so if I call the tag more than once in a page, the cfheader is only done on the first call. Any ideas how I might get it to do this? Thanks, Steve [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CFHEADER and IE showing wrong file and FireFox 0 Bytes
Carl V wrote: > Ahh ok...if I hard code the file it just plays instead of downloading (IE only)..is there a way around this? or does this come under the same issue (and yes I have tried both "inline" and "attachment") and both don't work... Yes, same issue. Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CFHEADER and IE showing wrong file and FireFox 0 Bytes
Ahh ok...if I hard code the file it just plays instead of downloading (IE only)..is there a way around this? or does this come under the same issue (and yes I have tried both "inline" and "attachment") and both don't work... No there is no URL cause it would breach the privacy, so sorry.. >It is well known that IE is broken. MS made it gues the content >of the response based on the first X bytes instead of following >RFC 2616 19.5.1. > >Do you have a URL so we can observe the FireFox behaviour? > >Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CFHEADER and IE showing wrong file and FireFox 0 Bytes
It is well known that IE is broken. MS made it gues the content of the response based on the first X bytes instead of following RFC 2616 19.5.1. Do you have a URL so we can observe the FireFox behaviour? Jochem [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CFHEADER & CFCONTENT question
What does the variable #filename# and #application.filehttppathstring# resolve to? I don't really want the real thing if security is an issue, just a dummy example. Ray http://www.crystalvision.org At 01:19 PM 3/31/2004, Ketan Patel wrote: >Hi, >I have a intranet application where I am allowing people to download access >database. Following is the code I am using > > > >FILE="#application.filehttppathstring##location#" DELETEFILE="No"> > >My problem is when I want to save the file it gives me 2 options Save as >HTML Document or All files. I don't want the option to save as HTML >document. Is there any mime setting or any code change need to be done. > >Any help is appreciated. Thanks in advance > >Ketan Patel > > > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CFHeader/CFContent woes.
Mary Jo Sminkey wrote: > > > > > >file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No"> > > > >The problem is that no matter what I do to the cfheader line, I NEVER see > >"fax_tenant.doc" as the requested filename. I see the name of the > .cfm file > >(which is word_test.cfm in this case). I wouldn't really care if the > thing > >would at least display or save the word file. > > > > Was searching for solutions for this same problem and came across this > thread, but have yet to find any reason for it. It's very frustrating > because it works fine in development, but on production, it won't give > us the Word file. We are running the same Win2K server on both, same > service pack, same version of Cold Fusion, and of course, I'm viewing > these pages on the same IE browser. I've run out of options to check > at this point, surely there is *some* reason this is happening! > Just a guess, but how about comparing the IIS config between the 2 servers? Maybe the MIME Map File Types might have different settings. Not sure if that has anything to do with it, but I would think something has to be different in the IIS config between the 2 boxes. Dan [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFHeader/CFContent woes.
Hi, Not sure if this will help but I noticed in my cfheader/cfcontent code that I had double quotes around the filename in the value attribute of the cfheader tageg value="inline; filename=""myfilename.doc""" HTH Alex > | -Original Message- > | From: Shawn Grover [mailto:[EMAIL PROTECTED] > | Sent: Saturday, January 10, 2004 23:07 > | To: CF-Talk > | Subject: CFHeader/CFContent woes. > | > | I know this is a relatively common question on the list, but the > | common answers/solutions just aren't working for me. > | > | I've built a testing page to isolate my problem with the following > | code: > | > | > | file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No"> > | > | The problem is that no matter what I do to the cfheader > line, I NEVER > | see "fax_tenant.doc" as the requested filename. I see the > name of the > | .cfm file (which is word_test.cfm in this case). I wouldn't really > | care if the thing would at least display or save the word file. > | > | I've tried changing the cfheader line to read VALUE="inline; > | filename=fax_tenant.doc", and VALUE="filename=fax_tenant.doc" > | - both had absolutely no effect. > | I've blew away my browser and server cache, and the compliled java > | classes for the page, and still saw no difference. I've > tested this on > | two other workstations, and they saw the same behavior. > | So it's not workstation specific. > | > | I'm stumped. I have another application on the same server > that does > | the same two lines (with application specific values of > course), and > | it runs fine. > | > | Can anyone tell me what I'm doing wrong? The server is > CFMX 6.0, and > | an upgrade to 6.1 is not an option at this time. > | > | Shawn > | > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFHeader/CFContent woes.
Shawn, You shouldn't see the filename in the URL bar, you are still making a request to that .cfm template. The filename comes into place when you open the file in word or when you click 'save', then that filename will be used (instead of the .cfm template). /Hugo - Hugo Ahlenius E-Mail: [EMAIL PROTECTED] Project Officer Phone:+46 8 230460 UNEP GRID-Arendal Fax: +46 8 230441 Stockholm Office Mobile: +46 733 467111 WWW: http://www.grida.no - | -Original Message- | From: Shawn Grover [mailto:[EMAIL PROTECTED] | Sent: Saturday, January 10, 2004 23:07 | To: CF-Talk | Subject: CFHeader/CFContent woes. | | I know this is a relatively common question on the list, but | the common answers/solutions just aren't working for me. | | I've built a testing page to isolate my problem with the | following code: | | | file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No"> | | The problem is that no matter what I do to the cfheader line, | I NEVER see "fax_tenant.doc" as the requested filename. I | see the name of the .cfm file (which is word_test.cfm in this | case). I wouldn't really care if the thing would at least | display or save the word file. | | I've tried changing the cfheader line to read VALUE="inline; | filename=fax_tenant.doc", and VALUE="filename=fax_tenant.doc" | - both had absolutely no effect. | I've blew away my browser and server cache, and the compliled | java classes for the page, and still saw no difference. | I've tested this on two other workstations, and they saw the | same behavior. | So it's not workstation specific. | | I'm stumped. I have another application on the same server | that does the same two lines (with application specific | values of course), and it runs fine. | | Can anyone tell me what I'm doing wrong? The server is CFMX | 6.0, and an upgrade to 6.1 is not an option at this time. | | Shawn | [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFHeader/CFContent woes.
No luck on that. I've worked around the problem for now by opening a new window and directing it at the UNC path to the file in question. The application is intended for an Intranet, so this should be a resonable solution. Thanks anyways. Shawn -Original Message- From: Kay Smoljak [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 4:56 PM To: CF-Talk Subject: Re:CFHeader/CFContent woes. Shawn Grover wrote: >The problem is that no matter what I do to the cfheader line, I NEVER see >"fax_tenant.doc" as the requested filename. I see the name of the .cfm file >(which is word_test.cfm in this case). I wouldn't really care if the thing >would at least display or save the word file. I had this problem with IE with a Perl script, of all things... the solution was to add the content-length property. I assume the same thing might work with CF if you add: HTH, Kay. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CFHeader/CFContent woes.
Shawn Grover wrote: > sorry, the page is on an internal development server. Then just telnet to the webserver and see if the proper headers are returned. > I just noted though the problem doesn't occur in Netscape 7.1, but does in > IE 6.0. I've also found refernce to a windows bug, but not the details of > the bug. I need this to work in IE 5.5 or better (client workstation > configuration), but don't know what else I can do to resolve this. Any > suggestions? If the proper headers are returned (which I expect to be so), you might want to give Microsoft a call. Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFHeader/CFContent woes.
The final code I have written is similar, but to isolate the problem, I have created a "simplified" page with just the CFHeader and CFContent lines. The problem is that the cfheader seems to be ignored by IE. The mime type appears to be working fine thus far. Shawn -Original Message- From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 3:10 PM To: CF-Talk Subject: RE: CFHeader/CFContent woes. I always use application/unknown. Here is the code that I use. value="attachment;filename=#qry_getDocument.documentLink#"> file="#expandPath('..')&'\assets\uploads\'&qry_getDocument.documentLink# " deletefile="no"> addtoken="no"> The try/catch is there because if someone hits cancel, you will recieve a socket connection has been reset error. -Original Message- From: Shawn Grover [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 5:07 PM To: CF-Talk Subject: CFHeader/CFContent woes. I know this is a relatively common question on the list, but the common answers/solutions just aren't working for me. I've built a testing page to isolate my problem with the following code: file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No"> The problem is that no matter what I do to the cfheader line, I NEVER see "fax_tenant.doc" as the requested filename. I see the name of the .cfm file (which is word_test.cfm in this case). I wouldn't really care if the thing would at least display or save the word file. I've tried changing the cfheader line to read VALUE="inline; filename=fax_tenant.doc", and VALUE="filename=fax_tenant.doc" - both had absolutely no effect. I've blew away my browser and server cache, and the compliled java classes for the page, and still saw no difference. I've tested this on two other workstations, and they saw the same behavior. So it's not workstation specific. I'm stumped. I have another application on the same server that does the same two lines (with application specific values of course), and it runs fine. Can anyone tell me what I'm doing wrong? The server is CFMX 6.0, and an upgrade to 6.1 is not an option at this time. Shawn _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFHeader/CFContent woes.
I always use application/unknown. Here is the code that I use. value="attachment;filename=#qry_getDocument.documentLink#"> file="#expandPath('..')&'\assets\uploads\'&qry_getDocument.documentLink# " deletefile="no"> addtoken="no"> The try/catch is there because if someone hits cancel, you will recieve a socket connection has been reset error. -Original Message- From: Shawn Grover [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 5:07 PM To: CF-Talk Subject: CFHeader/CFContent woes. I know this is a relatively common question on the list, but the common answers/solutions just aren't working for me. I've built a testing page to isolate my problem with the following code: file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No"> The problem is that no matter what I do to the cfheader line, I NEVER see "fax_tenant.doc" as the requested filename. I see the name of the .cfm file (which is word_test.cfm in this case). I wouldn't really care if the thing would at least display or save the word file. I've tried changing the cfheader line to read VALUE="inline; filename=fax_tenant.doc", and VALUE="filename=fax_tenant.doc" - both had absolutely no effect. I've blew away my browser and server cache, and the compliled java classes for the page, and still saw no difference. I've tested this on two other workstations, and they saw the same behavior. So it's not workstation specific. I'm stumped. I have another application on the same server that does the same two lines (with application specific values of course), and it runs fine. Can anyone tell me what I'm doing wrong? The server is CFMX 6.0, and an upgrade to 6.1 is not an option at this time. Shawn _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFHeader/CFContent woes.
sorry, the page is on an internal development server. I just noted though the problem doesn't occur in Netscape 7.1, but does in IE 6.0. I've also found refernce to a windows bug, but not the details of the bug. I need this to work in IE 5.5 or better (client workstation configuration), but don't know what else I can do to resolve this. Any suggestions? Shawn -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 3:09 PM To: CF-Talk Subject: Re: CFHeader/CFContent woes. Shawn Grover wrote: > > > > file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No"> > > The problem is that no matter what I do to the cfheader line, I NEVER see > "fax_tenant.doc" as the requested filename. I see the name of the .cfm file > (which is word_test.cfm in this case). I wouldn't really care if the thing > would at least display or save the word file. > > I've tried changing the cfheader line to read VALUE="inline; > filename=fax_tenant.doc", and VALUE="filename=fax_tenant.doc" - both had > absolutely no effect. > I've blew away my browser and server cache, and the compliled java classes > for the page, and still saw no difference. > I've tested this on two other workstations, and they saw the same behavior. > So it's not workstation specific. URL? Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CFHeader/CFContent woes.
Shawn Grover wrote: > > > > file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No"> > > The problem is that no matter what I do to the cfheader line, I NEVER see > "fax_tenant.doc" as the requested filename. I see the name of the .cfm file > (which is word_test.cfm in this case). I wouldn't really care if the thing > would at least display or save the word file. > > I've tried changing the cfheader line to read VALUE="inline; > filename=fax_tenant.doc", and VALUE="filename=fax_tenant.doc" - both had > absolutely no effect. > I've blew away my browser and server cache, and the compliled java classes > for the page, and still saw no difference. > I've tested this on two other workstations, and they saw the same behavior. > So it's not workstation specific. URL? Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFHEADER - explanation
>From an earlier Dave Watts email... -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: Russ [mailto:russ@;unrealisticexpectations.com] > Sent: Monday, October 28, 2002 12:55 AM > To: CF-Talk > Subject: CFHEADER - explanation > > > I'm attempting to implement a cookie, and I understand that you cannot > do that (at least set it) when you are using a CFLOCATION tag, and that > it's recommended to use a CFHEADER tag, however, I'm not finding any > examples of how to effectively pull this off. > > Can anyone point me to an example? > > Thanks, > > Russ > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: CFHEADER/CFCONTENT excel + serverMX + SSL
Just a few suggestions Does It work if you just specify attachment instead of inline/attachment? What if you give it a dummy mime type e.g. Does it prompt you to open or download it? Finally out of curiosity is there any reason why you have so many double quotes around the filename? HTH Kola -Original Message- From: olivier [mailto:[EMAIL PROTECTED]] Sent: 11 September 2002 18:06 To: CF-Talk Subject: CFHEADER/CFCONTENT excel + serverMX + SSL Hello All, Here is a an interesting issue ... We used to have the following 2 lines of code work just great to open a TABLE-based report in Excel with any IE version and CFserver5: After migrating to Coldfusion Server MX, this is not working anymore with any IE (actually it only works with one IE5.5 in the whole company, but can't find out where the configuration difference could be). It comes up with the message "Internet Explorer cannot download...ex.cfm?action=report&type=ship". It works fine with Netscape though. I tried to use another version provided on BF's book, but still have the exact same issue. Now, if I change the URL from https to http, it works fine on IE !!... Strange hu ? But the https version used to work just fine with the same cfm code on CF Server 5, and any version of IE ! After playing around with it, it looks like excel is trying to open the file named "https://the.site/file.cfm?action=theaction"; instead of having IE downloading the content first, and then handing it over to excel with the filename specified in the CFHEADER ... I tried: * changing the settings on the Windows File Types, forcing download, or browse in the same window, etc... didn't help * looked over the settings of IE 5.5 on the only computer where this work... couldn't find anything... * tried to remove the extension on the "filename=" in the CFHEADER, didn't work... * imported the SSL CA certificate on the workstation, didn't help... Conclusion so far: CFserver5 + HTTP + IE = no problem CFserver5 + HTTPS + IE = no problem CFserverMX + HTTP + IE = no problem CFserverMX + HTTPS + IE = problem All tests have been done on Win2K & XP workstations. Anybody have an idea ? Thanks so much !!! Olivier. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFHEADER/CFCONTENT excel + serverMX + SSL
Oliver, Just tried this with MX + SSL +IE6 on XP workstation and worked fine: SELECT * FROM ORG_EMPLOYEE WHERE status = 0 Untitled Fname lname #FNAME# #LNAME# Frank Mamone - Original Message - From: "olivier" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, September 11, 2002 1:05 PM Subject: CFHEADER/CFCONTENT excel + serverMX + SSL > Hello All, > > > Here is a an interesting issue ... > > We used to have the following 2 lines of code work just great to open a > TABLE-based report in Excel with any IE version and CFserver5: > > VALUE="inline/attachment;filename=""SHIPMENTREPORT.XLS"""> > > > After migrating to Coldfusion Server MX, this is not working anymore with > any IE (actually it only works with one IE5.5 in the whole company, > but can't find out where the configuration difference could be). > > It comes up with the message "Internet Explorer cannot > download...ex.cfm?action=report&type=ship". It works fine with Netscape > though. > > I tried to use another version provided on BF's book, but still have the > exact same issue. > > > > Now, if I change the URL from https to http, it works fine on IE !!... > Strange hu ? But the https version used to work just fine with the same cfm > code on CF Server 5, and any version of IE ! > > After playing around with it, it looks like excel is trying to open the file > named "https://the.site/file.cfm?action=theaction"; instead of having IE > downloading the > content first, and then handing it over to excel with the filename specified > in the CFHEADER ... > > I tried: > * changing the settings on the Windows File Types, forcing download, or > browse in the same window, etc... didn't help > * looked over the settings of IE 5.5 on the only computer where this work... > couldn't find anything... > * tried to remove the extension on the "filename=" in the CFHEADER, didn't > work... > * imported the SSL CA certificate on the workstation, didn't help... > > Conclusion so far: > CFserver5 + HTTP + IE = no problem > CFserver5 + HTTPS + IE = no problem > CFserverMX + HTTP + IE = no problem > CFserverMX + HTTPS + IE = problem > All tests have been done on Win2K & XP workstations. > > Anybody have an idea ? > > > Thanks so much !!! > > > Olivier. > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFHEADER/CFCONTENT with IE vs Netscape
> Folks, I have the following two CF tags: > > > > deletefile="No"> > > When using IE (5.5), these two cause it to pop up the file > download dialog box where I can choose to open the file from > its current location or save it to disk. This is exactly what > I want to have happen. > > But when I use Netscape (either 4.7 or 6.1), the file is always > opened in line in the current frame. I don't get the opportunity > to save it to disk? > > How come? How can I get Netscape to prompt for a download? Is > there something I should do in the CF tags to get it to prompt > for download? Try specifying the MIME type as "application/unknown". Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFHeader and jpegs
Thanks Peter, I had actually started off with "image/jpeg" instead of "image/pjpeg". Same deal. The strange thing is that this all works if I go directly through the template that uses the CFCONTENT tag. I wonder what that means? Cheers, Tania "Peter Janett" <[EMAIL PROTECTED]> on 05-06-2001 05:44:02 PM Please respond to [EMAIL PROTECTED] To: CF-Talk <[EMAIL PROTECTED]> cc: Subject: Re: CFHeader and jpegs Try removing the line altogether. Another idea would be do mark the jpgs as "image/jpeg", instead of "image/pjpeg". Maybe the browser doesn't like the progressive part of the jpg image type header. Just some random ideas, Peter Janett New Media One Web Services WEB HOSTING FOR WEB DEVELOPERS Sun, IRIX, Windows 2000, Linux; PHP, MySQL, Perl, Cold Fusion, MS SQL, ASP, SSI, SSL http://www.newmediaone.net [EMAIL PROTECTED] (303)828-9882 - Original Message - From: <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, June 05, 2001 1:29 AM Subject: CFHeader and jpegs > Hi, > > I'm developing an application that needs to protect images from directory > snoopers and yet remains relatively easy to maintain. > > I've decided to use the CFCONTENT tag in conjuction with the CFHEADER tag in > order to push out images onto a page. > > However, the boss has decreed that users should be allowed to save these images, > and have the correct image name and type worked out for them in the dialog box. > > I have used the following code for gif files: > > > > and this for jpg files: > > > > > The teststuff/index.cfm file checks to see what sort of hreflink we have, i.e. a gif or a jpg, and then assigns variables.filetype of "image/gif" or > "image/pjpeg" > respectively. There is also a session variable that is set to the file path (hidden from the webserver). > > In all, the final code used to push out the image is: > > > > This is all on one line. I have checked all of the variables and they are translating correctly. > > Problem: This works just fine until the user wants to save the image on the calling page and we're looking at a jpg file. If we're looking at a gif file > everything works > OK. If we're looking at a jpg a right-click on the calling page gives the user the option of saving the image as a BMP file, and gives it a filename of > "untitled". > > This is not what the boss wants!! > > If we copy the url from the image properties into the address bar, i.e. go direct to the template doing the cfcontent (in this case teststuff/index.cfm) and > look at that > very same jpg file, the file saves as a jpg with the correct filename. Weird eh? > > Question: Is there anything that could confuse a header into thinking that it should be publishing a jpg file as a bitmap? > > Any clues/help/insights/war stories would be greatly appreciated. > > Cheers, > > Tania > > > > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFHeader and jpegs
Does it have anything to do with the fact that jpg's get decompressed to bitmaps and that's what IE thinks they are? > > Question: Is there anything that could confuse a header into > > thinking that it should be publishing a jpg file as a bitmap? > > If your using IE - its Just Broken in that regard, though a few posts on > here in the last few weeks concerned with donwloading files may help - check > the archives. > > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFHeader and jpegs
Try removing the line altogether. Another idea would be do mark the jpgs as "image/jpeg", instead of "image/pjpeg". Maybe the browser doesn't like the progressive part of the jpg image type header. Just some random ideas, Peter Janett New Media One Web Services WEB HOSTING FOR WEB DEVELOPERS Sun, IRIX, Windows 2000, Linux; PHP, MySQL, Perl, Cold Fusion, MS SQL, ASP, SSI, SSL http://www.newmediaone.net [EMAIL PROTECTED] (303)828-9882 - Original Message - From: <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, June 05, 2001 1:29 AM Subject: CFHeader and jpegs > Hi, > > I'm developing an application that needs to protect images from directory > snoopers and yet remains relatively easy to maintain. > > I've decided to use the CFCONTENT tag in conjuction with the CFHEADER tag in > order to push out images onto a page. > > However, the boss has decreed that users should be allowed to save these images, > and have the correct image name and type worked out for them in the dialog box. > > I have used the following code for gif files: > > > > and this for jpg files: > > > > > The teststuff/index.cfm file checks to see what sort of hreflink we have, i.e. a gif or a jpg, and then assigns variables.filetype of "image/gif" or > "image/pjpeg" > respectively. There is also a session variable that is set to the file path (hidden from the webserver). > > In all, the final code used to push out the image is: > > > > This is all on one line. I have checked all of the variables and they are translating correctly. > > Problem: This works just fine until the user wants to save the image on the calling page and we're looking at a jpg file. If we're looking at a gif file > everything works > OK. If we're looking at a jpg a right-click on the calling page gives the user the option of saving the image as a BMP file, and gives it a filename of > "untitled". > > This is not what the boss wants!! > > If we copy the url from the image properties into the address bar, i.e. go direct to the template doing the cfcontent (in this case teststuff/index.cfm) and > look at that > very same jpg file, the file saves as a jpg with the correct filename. Weird eh? > > Question: Is there anything that could confuse a header into thinking that it should be publishing a jpg file as a bitmap? > > Any clues/help/insights/war stories would be greatly appreciated. > > Cheers, > > Tania > > > > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFHeader and jpegs
> Question: Is there anything that could confuse a header into > thinking that it should be publishing a jpg file as a bitmap? If your using IE - its Just Broken in that regard, though a few posts on here in the last few weeks concerned with donwloading files may help - check the archives. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFHEADER questions
That's what I'm looking for. Excellent! tom "Zachary S. Bedell" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > At the top of your file, put: > > > Then for the rest of the page request (or until you do enablecfoutputonly="No">), ONLY stuff that's between and > will get sent out. So this: > > > > > This is your page > > This isn't! > > > > Would result in only 17 bytes of output ("This is your page"), plus > headers. The "This isn't!" part would never get sent out. > > Hope that helps! > > Best regards, > Zac Bedell ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFHEADER questions
Thanks. In ASP I can do it with a Response.Flush and Response.End, but I didn't think there was a CF equivalent (although I think CF 5 has something like this. . .haven't played with the new features yet). tom <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > That is a pain. As I said, I generally put everything into a variable and > then send that, but you still have to be careful about whitespace. There's > no magic way to say "CFCONTENT only up to this point" that I know of. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFHEADER questions
Could you do a CFEXIT or CFABORT? At 03:46 PM 4/5/01 -0400, you wrote: >That is a pain. As I said, I generally put everything into a variable and >then send that, but you still have to be careful about whitespace. There's >no magic way to say "CFCONTENT only up to this point" that I know of. > >-Original Message- >From: tom muck [mailto:[EMAIL PROTECTED]] >Sent: Thursday, April 05, 2001 1:30 PM >To: CF-Talk >Subject: Re: CFHEADER questions > > >Thanks for that link. Very informative. > >As to the other question: I was mainly interested in it from a practical >point of view. When I insert the code on the page from a snippet, I always >have to make sure that there isn't any whitespace, closing or > tags, or any other tags after it, or they end up in the file. I >just want to make sure the output gets cut off immediately. > >tom > ><[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I'm not sure what you mean by stopping the output. Do you mean that you > > might start working through a query (or something) and then find that you > > don't want to send the data to the user after all? If so, you could first > > put all the data to download into a variable, then only do the CFCONTENT >if > > you've decided the data are ok. > > > > I've used this sort of approach to create RTF files to download to the > > browser before; I wouldn't call it easy but it's certainly possible. More > > info here: http://forums.allaire.com/devconf/Index.cfm?Message_ID=172003 > > > > -Original Message- > > From: tom muck [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, April 05, 2001 10:21 AM > > To: CF-Talk > > Subject: CFHEADER questions > > > > > > I have some code on my page using and that allows >the > > download of a to a text file. Is there anything I can use on > > that page, aside from a or to stop the output of >the > > server to the text file? > > > > Also, is there an easy way to create an RTF or Word doc on the fly using > > this method? > > > > tom > > > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists