>>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

Reply via email to