Uploaded image for project: 'Lucee Development'
  1. LDEV-793

Fix compatibility - HTML 5 multiple file upload

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: New
    • Resolution: Fixed
    • Affects Version/s: 5.0.0.219, 5.0.0.222
    • Fix Version/s: 5.0.0.226, 4.5.3.011
    • Labels:
      None

      Description

      It is 1 line of code to fix this to be ACF compatible. Please re-consider fixing this soon.

      Example Code - only 1 file is able to be processed no matter how many are uploaded with form:
      <cfif structkeyexists(form, "imagefiles")>
      do upload.
      <cffile action="uploadAll" result="cffileresult" destination="#expandpath("/")#" nameconflict="makeunique">
      <cfdump var="#cffileresult#">
      <cfabort>
      </cfif>
      <form id="form1" action="" enctype="multipart/form-data" method="post">
      <input type="file" name="imagefiles" id="imagefiles" multiple="multiple" /><br /><br />
      <input type="submit" name="submit222" value="Upload" />
      </form>

      Proposed fix:
      https://github.com/lucee/Lucee/blob/master/core/src/main/java/lucee/runtime/type/scope/FormImpl.java

      line 194, change:
      fileItems.put(item.getFieldName().toLowerCase(),
      to:
      fileItems.put(getFileName(),

      or use some other method of making sure each fileItem key is uniquely named.

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              brucekirkpatrick Bruce Kirkpatrick
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: