tracker issue : CF-3132537

select a category, or use search below
(searches all categories and all time range)
Title:

ColdFusion not handling HTML5 multiple uploads correctly.

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): David Boyer / David Boyer (MisterDai)

Created: 03/07/2012

Components: File Management

Versions: 10.0

Failure Type: Data Loss

Found In Build/Fixed In Build: Public Beta / 281881

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Linux All

Vote Count: 1

Problem Description:
When submitting a form that contains more than one HTML5 upload field (each having the "multiple" attribute set), ColdFusion appears to mix up the number of files each field was sent and the content.  Results in not all files being present when processed with CFFile action="uploadall" and some of the files containing the wrong content (from other uploads).

Steps to Reproduce:
1. Create a form
<form method="post" enctype="multipart/form-data" action="uploads.cfm">
  <label>First: <input type="file" name="first" multiple="multiple" /></label><br />
  <label>Second: <input type="file" name="second" multiple="multiple" /></label><br />
  <label>Third: <input type="file" name="third" multiple="multiple" /></label><br />
  <input type="submit" value="Upload" />
</form>
2. Using 7 uniquely named files, select 1 file to upload to the field "first".
3. Select 2 files for the field "second".
4. Select 4 files for the field "thrid".
5. Submit the form.
6. Dump, form, form.getPartsArray(), form.getTempFiles() and use CFFile action="uploadall".

Actual Result:
* form.fieldnames held correct number of field names.
* form.third held 5 files instead of 4.
* 2 of the file names in form.third were the 2 listed in form.second.
* 5 files received instead of 7.

Expected Result:
* 7 files in the destination folder.
* form fields to contain the correct number of temporary files to uploads.
* Each upload once processed with CFFile upload / uploadAll to contain the right content.

Any Workarounds:
None, uploads are handled internally by ColdFusion.  Without a fix, HTML5 multiple uploads are broken and should definitely not be used as it'd result in lost content and incorrect file content.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3132537

External Customer Info:
External Company:  
External Customer Name: Mister_Dai
External Customer Email:  
External Test Config: Ubuntu 11.04 Server 32-bit (Running in VirtualBox on Windows XP)

ColdFusion 10.0 Beta

Apache 2.2

Attachments:

  1. March 07, 2012 00:00:00: 1_upload_bug.cfm

Comments:

form.getPartsArray() appears to contain the correct information as far as form fields and original file upload name are concerned. Displayed by looping the array it returns are displaying .getName() and .getFileName(). Failure Type also covers: Data Corruption
Comment by External U.
20276 | March 07, 2012 07:22:16 AM GMT
More detail and screenshots of CFDumps contained on my blog. http://misterdai.wordpress.com/2012/03/08/coldfusion-10-beta-multiple-html5-multiple-uploads-bug
Comment by External U.
20277 | March 08, 2012 08:23:50 AM GMT
Seems pretty cut and dry, a small bug that would be detrimental to future use cases.
Vote by External U.
20278 | March 08, 2012 11:13:16 PM GMT