tracker issue : CF-4203252

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

Allow uploading all files of an <input type="file" multiple>

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): Sebastian Zartner / ()

Created: 08/08/2018

Components: File Management, CFFile

Versions: 2016

Failure Type: Others

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: / Platforms All

Vote Count: 0

Currently, you have two possibilities to upload files, fileUpload() and fileUploadAll() (resp. <cffile action="fileupload"> and <cffile action="fileuploadall">). The former allows you to upload a single file of a given form field, the latter uploads all files of a request.

Unfortunately, fileUpload() only uploads a single file of the given form field, even when you have set the multiple attribute on the <input type="file">. fileUploadAll(), on the other side, uploads all files of whole form, which may be spread over multiple <input type="file">s, which you may want to handle differently.
There is no option to handle all the files - and just those - of a single <input type="file" multiple>.

So I suggest to either change the functionality of fileUpload() to handle all the files of a given field and output an array of structs like fileUploadAll() does. If changing the default behavior causes compatibility problems, then this could be controlled via an additional argument multiple, defaulting to false.

Attachments:

Comments: