1

I am new to Coldfusion, looking for downloading pdf file (blob) from database here my code

<cfquery name="download" datasource="#APPLICATION.datasource#">
   select DOC_TEMPLATE,NAME
     from EXT_FORMS where seq_id = 216
</cfquery>
<cfheader  name="content-disposition" value="attachment; filename=#download.NAME#.pdf">
<cfcontent type="application/pdf" reset="true" variable="#download.DOC_TEMPLATE#"> 

Getting Failed to load pdf file error.

Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58
  • Check your DSN settings. Ensure BLOB's are enabled and that the pdf data is not accidentally being truncated. https://stackoverflow.com/questions/33112544/coldfusion-how-to-save-pdf-file-in-database-and-fetch-it-in-browser – Leigh Jun 14 '17 at 12:48
  • Glad you got it working. Since this was covered by the other thread, voting to close as a duplicate. – Leigh Jun 14 '17 at 20:09

0 Answers0