Insert to MS-SQL 2008 Database
<cffile action="READBINARY" file="#form.FileContents#" variable="binPDF">
<cfquery name="Uploaded" datasource="#cfbasedatasource#">
INSERT INTO UploadedFiles
(
AccountId,
Filecontent
)
VALUES
(
'#UrlAccountId#',
<cfqueryparam value='#binPDF#' cfsqltype='cf_sql_blob'>
)
</cfquery>
========================= This is Show from Database to browser:
<cfset binaryData = #cfGetfilecontentquery.Filecontent[1]#>
<cfheader name="Content-Disposition" value="inline; filename=testDocument.pdf">
<cfcontent variable="#binarydata#" type="application/pdf" reset="yes" />
But I can only see in browser "Fail to Load PDF Document"