Back in beta, I had made a post on this new tag in ColdFusion 9. It creates a Flash interface allowing the user to upload multiple files to the server. A pretty easy way to achieve something powerful. Back in beta, there was also a bug with the funtionality. It was that ColdFusion was not automatically passing back Success, Failure messages. With the release now, that has been taken care of, so we can revise the beta code.

Demo currently unavailable

Lets take a look at how simple the code is

fileupload1.cfm:

view plain print about
1<cffileupload
2    name = "uploadDemo"
3    url="uploadSelectedFiles.cfm"
4    progressbar="true"
5    addButtonLabel = "Select File(s)"
6    clearButtonLabel = "Clear"
7    width="500"
8    height="400"
9    title="Multi File Upload Demo"
10    maxUploadSize="1"
11    maxFileSelect="10"
12    extensionfilter="*.txt,*.jpg,*.png,*.doc"
13    uploadButtonLabel="Upload"
14    >

uploadSelectedFiles.cfm:

view plain print about
1<cffile action = "uploadAll" destination = "c:\temp\" nameConflict = "MakeUnique">

Very Simple, very easy.