tracker issue : CF-3648713

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

cffile action="upload" not reporting results correctly in default result scope

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Scott Brady / Scott Brady (Scott Brady)

Created: 10/10/2013

Components: File Management

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / 287509

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Mac 10.7 64-bit

Vote Count: 0

Problem Description:
If you are doing multiple file uploads (using action="uploadAll") but don't specify a result variable, the default results (CFFILE.*) only display the results of 1 of the uploaded files.

Steps to Reproduce:
1) Create a form that allows for multiple file uploads (i.e., <input type="file" multiple="true" />
2) Upload at least 2 files at once via that form.
3) Process the form by using <cffile action="uploadAll" .... /> and do NOT specify a result attribute.
4) Do a dump of the results ( <cfdump var="#cffile#"> )

Actual Result:
The dump displays only 1 of the file records

Expected Result:
The dump should display an array of all of the file records 

Per the docs: "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. "  This could be interpreted as saying that this works only if you specify a result parameter, but the documentation on the "result" attribute implies that the CFFILE scope should contain all of the results, as well.

Any Workarounds:
Specify a result attribute in the cffile tag.

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

Watson Bug ID:	3648713

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: dsbrady_98
External Customer Email:  
External Test Config: My Hardware and Environment details:

Mac OS 10.7.5 running the CF 10 developer edition ( 10,0,11,285437 )

Attachments:

Comments:

I realize this is probably due to the built-in CFFILE scope being only a struct and not allowing arrays, but either that scope should allow for arrays (in the next version of CF) or at least the docs should be updated to note that if you don't specify a result attribute, all of the results will not be returned. Alternatively, for action="uploadAll" the result attribute could be made required.
Comment by External U.
14289 | October 10, 2013 01:18:52 PM GMT
The details of the uploaded file information now can be retrieved through the variable cffile.uploadAllResults when result attribute is not specfied.
Comment by S V.
14290 | January 06, 2014 03:01:16 AM GMT