Details
Assignee
UnassignedUnassignedReporter
Sebastian ZartnerSebastian ZartnerNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
New
Details
Details
Assignee
Unassigned
UnassignedReporter
Sebastian Zartner
Sebastian ZartnerNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Created 8 August 2018 at 13:44
Updated 12 January 2023 at 12:41
Currently, you have two possibilities to upload files,
fileUpload()
andfileUploadAll()
(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 themultiple
attribute on the<input type="file">
.fileUploadAll()
, on the other side, uploads all files of the whole form, which may be spread over multiple<input type="file">
elements, 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 change the functionality of
fileUpload()
to handle all the files of a given field and output an array of structs likefileUploadAll()
does. If changing the default behavior causes compatibility problems, then this could be controlled via an additional argumentmultiple
, defaulting tofalse
.