File direct from database to open/save, without tempfile
Hello, everyone.
I've got the file uploading to the database, and that is working most excellent.
How do I get it to open/save immediately without first using CFFILE action="write" to save it to a server folder, first?
I'm using the following code:
<cfcontent variable="#getFile.contents#" reset="true"><!--- binary data for file, pulled from "varbinary(max)" --->
<cfheader name="content-disposition" value="attachment;filename=#getFile.fileName#">
<cfheader name="content-type" value="application/octet-stream">
<cfoutput>#toString(getFile.contents)#</cfoutput>
<cfabort>
.. but all this does is open a dialogue asking the user to either open or save the CFM file calling it, but the .cfm is replaced with .ZIP.
The files are not all going to be the same MIMEtype - some will be Word documents, some Excel documents, some PowerPoint documents, and some PDF documents.
^_^
