judsonmusic
asked on
coldfusion multiple file upload
anyone know of a good way to allow someone to upload multiple files at once with coldfusion???
Like be able to select multiple photos on there computer and then click upload button and it will do al of them at the same time?
Judson
Like be able to select multiple photos on there computer and then click upload button and it will do al of them at the same time?
Judson
If you place five file upload controls on your form then will the form submit up to five files when user selected a file for each.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is it possible that you could expand on this and show how you could insert the information into a database?
ASKER
You would vreate a loop and do your insert statement inside of the loop. with that you you insert the five filenames into the database.
<cfloop from="1" to="5" index="i" >
<cfif isdefined("form.uploadfile "&i) and form["uploadfile"&i] GT "" >
<cfquery>
insert into mytable(image)
values('#cffile.ServerDire ctory#\#cf file.Serve rFileName# .#cffile.S erverFileE xt#')
</cfquery>
</cfif>
</cfloop>
<cfloop from="1" to="5" index="i" >
<cfif isdefined("form.uploadfile
<cfquery>
insert into mytable(image)
values('#cffile.ServerDire
</cfquery>
</cfif>
</cfloop>
http://www.adobe.com/devnet/coldfusion/articles/multifile_upload.html
or this
http://www.devarticles.com/c/a/ColdFusion/Multiple-File-Upload-with-CFFILE/
http://www.bennadel.com/blog/1117-Ask-Ben-Uploading-Multiple-Files-Using-ColdFusion.htm