Skip to main content
April 4, 2011
Question

CFFile action="uploadall" question

  • April 4, 2011
  • 1 reply
  • 3420 views

I am doing a cffile uploadall process and I want to return a list/array of filenames uploaded.  It doesn't seem like it should be too hard - should it?

Thanks.

    This topic has been closed for replies.

    1 reply

    Inspiring
    April 4, 2011

    Take a look at the CF documentation.  It states: After a file upload is completed, this tag creates an array of structures specified by the result parameter. Each structure in the array contains upload result information for one file. For information on the result structure contents, see cffile action = "upload".

    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7388.html

    April 4, 2011

    Here's my code:

    Upload page -

    <cffileupload
    hideuploadbutton="no"
    progressbar= "no"
    stoponerror="yes"
    title="Upload Closeout Pictures"
    url="process.cfm?pro_num=#pro_num#&type=#urlencodedformat(form.type)#"
    wmode="transparent"
    maxfileselect=6 />

    <cfif isDefined("myImage.serverfile")>
          wow
    <cfelse>
          hey
    </cfif>

    Processing page -

    <cffile
    action="uploadall"
    destination="#path#"
    nameconflict="overwrite"
    result="myImage" />

    I get nothing in the myImage variable.

    Inspiring
    April 7, 2011

    Upload.cfm

    </cfif


    Your code continues to be truncated. If you are using email to reply please consider using the forum's web page instead. I have found that code is frequently mangled when posting to the forum by email.