cffileupload and upload all with ColdBox


I am trying to use cffileupload to do a mult-file upload within one of my ColdBox apps. Here is what I have:


UPLOAD ACTION (product.uploadProductImage)

<cffile action=“uploadall” destination="#expandpath("…/includes/images/products/")#" nameconflict=“makeunique”>

<cfset event.renderData(“JSON”,str)>

For some reason this is not working. I don’t get any error message and the progress bars are green and full to 100%. Is there something I’m overlooking?


Curt, you did something like this before right?

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:

I've just got into the same issue. The cffileupload makes a POST
request. The request goes then to the whole Request Livecycle.
Unfortunately, the multi file uploader does not pass cookies with the
request. So if you are working with session variables, a new session
will be created if a user hits "upload" in the multi file uploader. So
if you have the cffileupload in a secured area where a user has to be
logged in, the post request will fail, because the user won't be
logged in. What you can do is to append "?
#urlEncodedFormat(session.urltoken)#" to the url-string of
cffileupload. Then the session information will be passed along.

Found this information (and other useful stuff) in Ray Camdens blog:

Luis and Aaron,

I have. The solution is just as cftagger has recommended. Wrap it in
the urlEncodedFormat. Also, as cftagger suggested, if you want to
maintain the session, be sure to add the session token.


    addButtonLabel = "Add File"
    clearButtonlabel = "Clear it"
    hideUploadButton = "false"
    title = "Product Image Upload"
    UPLOADBUTTONLABEL="Upload now"/>

Ultimately though, I ended up using a jQuery plugin called uploadify
for my solution. I liked the implementation better.

It can be found at

Hope this helps,
Curt Gratz