Answered
Binary conversion within <cfoutput> tags
I'm performing a 'readBinary' action with the <cffile>
tag on Word docs, Excel spreadsheets, or PDF's, then converting the
file contents to Base64 and storing the result in a SQL Server 2005
text field. I'm trying to display the original file contents in a
Coldfusion template using the <cfcontent> tag. However,
converting the Base64 data back to binary between <cfouput>
tags is yielding the error: 'ByteArray objects cannot be converted
to strings'.
Does anyone know how I can display the original file without having to write it back to the server's file system? Please refer to the following code.
Does anyone know how I can display the original file without having to write it back to the server's file system? Please refer to the following code.