Good idea. However the CFABORT has me worried - in that case your OnRequestEnd.cfm wouldn't run (which may be a bad thing).
Using CFSILENT you can run things after as well. I guess it's kind of six of one, half dozen of the other. Jim Davis > -----Original Message----- > From: Mike Townend [mailto:[EMAIL PROTECTED] > Sent: Friday, September 05, 2003 5:27 PM > To: CF-Talk > Subject: RE: Sending binary directly to the browser? > > Instead of the cfsilent why not just reset whats being outputted... > > <!--- as much whitespace as you want can be put here ---> > <CFFILE action="READ" file="C:\CFusionMX\wwwroot\test\myGif.gif" > variable="gifFile"> > > <CFCONTENT TYPE="image/gif" > RESET="Yes"><cfoutput>#gifFile#</cfoutput><CFABORT> > > > HTH > > Mikey > > > > -----Original Message----- > From: Claude Schneegans [mailto:[EMAIL PROTECTED] > Sent: Friday, September 5, 2003 22:13 > To: CF-Talk > Subject: Re: Sending binary directly to the browser? > > > >>Christian Cantrell blogged an example of doing this here: > > Actually, after lots of reading and testing, I came to the conclusion that > all this is complicated for nothing. > > This simple code works fine under CF 6: > > <cfsilent> > <CFCONTENT TYPE="image/gif"> > <CFFILE action="READ" file="C:\CFusionMX\wwwroot\test\myGif.gif" > variable="gifFile"> > </cfsilent><cfoutput>#gifFile#</cfoutput> > > The CFSILENT seems to be necessary, but > <cfsetting showdebugoutput="No" /> is not > > This also works: > <cfsilent> > <CFCONTENT TYPE="image/gif"> > <CFFILE action="READBINARY" file="C:\CFusionMX\wwwroot\test\myGif.gif" > variable="gifFile"> </cfsilent><cfoutput>#ToString(gifFile)#</cfoutput> > > None of these work unde CF 5, under CF 4.x I don't know. > > What happens is simply that they manage to fix the problem of toString() > refusing to insert zero bytes in the string, and <CFOUTPUT refusion to > output a string containing zero bytes, PERIOD. > > There is still the problem that chr(0) returns an empty string instead of > a > one byte string containing zero like it should. But now, we can work on > the > binary content as an array, so we don't need string concatanation any > more. > > ... still looking for a work around for CF 5 ;-) > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com

