PDF binary variable won't save in Oracle blob
I am reading in a small, legitimate PDF as a binary variable and them immediately saving that variable into a blob. But the blob doesn't store the data.
<cffile action="readbinary" file="C:\Test_Files\test.pdf" variable="testdoc">
now shows isbinary(testdoc) = YES
In fact, I can output to the screen using cfcontent, and it displays fine.
But if I try to save the testdoc variable to an Oracle blob, CF seems to think it is trying to insert an empty variable.
<cfquery name="ins" datasource="#request.a_datasource#">
INSERT
INTO PROD_WCT.T_DOCS (
PDF_BLOB
)
VALUES (
<cfqueryparam value="#testdoc#" cfsqltype="CF_SQL_BLOB">
)
Now if I retrieve that row (query name=”get_pdf”) and check the value, it appears empty:
now shows isbinary(get_pdf.pdf_blob) = NO
Nothing is done in betweent the cffile and the insert. Any ideas?
