I just want to upload a file to my database using ColdFusion. I understand how to upload an image to a directory, but I would like to place it directly in the database.
I set the database field to varbinary (MAX) to accept the image and to have the stored procedure insert it. Currently, my code for uploading an image to my file system:
<cfif isdefined("form.FileUploadImage")>
<cffile action="upload" filefield="FileUploadImage" destination="#uploadfolder#" nameconflict="overwrite" accept="image/*" >
</cfif>
I obviously left part of the support code, but in fact all I have to do is get a binary representation of the file stored in memory, not in the file system.
Any experts that can help?
Thanks George
source
share