coldfusion Cómo guardar un archivo pdf en la base de datos y buscarlo en el navegador
Insertar en la base de datos MS-SQL 2008
<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>
========================= Esto es 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" />
Pero solo puedo ver en el navegador "Error al cargar el documento PDF"