Multiple File Upload with Flex and ColdFusion
I have this nifty UI up and running and have successfully uploaded multiple images into a designated folder. What I would also like to do is insert these same images into a database. Here is the .cfm action page...
<cftry>
<cffile action="upload"
filefield="filedata"
destination="#ExpandPath('\')#MultiFileUpload\uploads\"
nameconflict="makeunique"
accept="application/octet-stream"/>
<cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
<cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
<cfif filecheck eq false>
<cffile action="delete" file="#ExpandPath('\')#MultiFileUpload\uploads\#File.ServerFile#"/>
</cfif>
<!---<cfquery name="insertDetails" datasource="gallery">
INSERT INTO tblImages (title, desc, thumb, img)
VALUES ('#serverFile#','#serverFile#','#serverFile#','#serverFile#')
</cfquery>--->
<cfcatch type="any">
<cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
<cfdump var="#cfcatch#"/>
</cfdocument>
</cfcatch>
</cftry>
The commented area within the code is not part of the original. It is what I have added to attempt to get information into a MS Access database. Nothing shows up in the database however. Any comments, tips, or tricks will be greatly appreciated. Thank you!!

New Topic/Question
Reply




MultiQuote





|