> If I have the contents of a binary file in memory, is it 
> necessary to dump those contents to a file in order to send 
> it to the browser, or can I do something like this:
> 
> <cfset myImage = getMyImage()>
> <cfheader name="Content-Disposition"
>       value="attachment; filename=#myImage.name#"> <cfcontent 
> type="#myImage.type#"> <cfoutput>#myImage.binaryData#</cfoutput>

I don't think you can write binary data directly to page output like that. I
think you'll have to use the BinaryEncode function (in CF 7) or ToBase64 (in
earlier CF versions) on your binary data to write it to the page output.

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!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262483
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to