Uploading multiple files with ColdFusion
One of the most common annoyances about ColdFusion is the way the file upload functionality is implemented. Unlike ASP, PHP, JSP etc, file uploading is not handled by the Application Server (ColdFusion) but is farmed out to the webserver (IIS or Apache etc)
This means that while the file is being uploaded, ColdFusion just kinda sits there waiting for the file to be uploaded and a reference to the file handed back to CF. This means that you cant use some of the upload tricks of ASP, PHP etc to show the progress of the upload etc
Over the years, Peter and myself have tried to find a way of accomplishing this on the server side but to no avail. We have tried CFX tags, Java servlets called through ColdFusion etc
Andrei Kondrashev made a good stab at it using a CFX Tag and ISAPI filter but if you are on a server where installing such beasts isnt feasible there is nothing much can be done.
We wrote an ActiveX and DHTML ColdFusion component to allow multiple file uploads but the disadvantage is that it is IE only for selecting multiple files all at once. The DHTML interface is cross-browser and will uploaded multiple files but still requires you to add each file seperatley.
With the introduction of Flash 8, the problem is now achievable. ColdFusion will still use the webserver to upload the file so server side analysis of the file upload progress is still a no-no but using a Flash Component, DHTML and some clever programming, we can select and upload multiple files and give user feedback on the file upload progress.
I am tasked with designing the interface, the methods required, functionality and documentation and Peter is going to do the actual Flash programming.
Together we are finally going to solve this annoying problem and will be releasing our solution on CFTagStore.com for others to purchase and use in their applications.
Using Flash is beneficial for the following reasons:
- Client side checking of file size instead of waiting for a PFO from the server after the upload
- Select multiple files using SHIFT/CTRL or drag a selection using mouse
- Available to all browsers on all platforms
- Interface with Javascript for customisation and control such as event handlers etc
Comments
Put me on the list when this one comes out :-]
Thank you!
You can view the tag here: http://www.cftagstore.com/tags/flashmultipleupload.cfm
I have some doubts about CF ProFlash Upload.
Is its possible to get the selected files name even before uploading them? Just in case user forget to upload the files and move to some other page.
How can we call the upload function of the CF ProFlash Upload without clicking the "upload" button?
We are thinking of integrating CF ProFlash Upload in our application. what before that we have to make sure it provides the functionality which we are looking for.
If anyone of you have solution for these, then plz mail me.
Thank You,
Rajan G
Foster Wheeler