cffileupload and upload all with ColdBox

Hey,

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

CFFILEUPLOAD

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?

Thanks,
Aaron

Curt, you did something like this before right?

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

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.

<cffileupload

url="#urlEncodedFormat(event.buildlink('product.uploadProductImage'))#"
    progressbar="true"
    name="myupload"
    addButtonLabel = "Add File"
    clearButtonlabel = "Clear it"
    hideUploadButton = "false"
    width="600"
    height="400"
    title = "Product Image Upload"
    maxuploadsize="30"
    extensionfilter="*.jpg"
    BGCOLOR="##FFFFFF"
    MAXFILESELECT="6"
    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 http://www.uploadify.com/

Hope this helps,
Curt Gratz