Re: Process multiple uploaded files individually

Lukasz Lenart <[email protected]>
Newsgroups gmane.comp.jakarta.struts.user
Message-ID <CAMopvkPYQ349ysprQ3Nrya+xu2vb4caKyVEt79wdO8OzKczsJQ@mail.gmail.com>
pon., 2 wrz 2024 o 09:59 Florian Schlittgen <[email protected]> napisał(a):
> The ActionFileUploadInterceptor was introduced with WW-5371 and the API
> has been greatly simplified as a result. However, there is a problem if
> you upload several files and want to process them individually later.
> This is no longer possible because the name of the input element (<input
> type="file" name="myFile">) is not part of the "UploadedFile" class.
>
> Or have I overlooked another option for this?
> Thanks for a short feedback.

Good catch, there is no way to get a field name with the new
mechanism. It was lost because of flatting the structure. Feel free to
register a bug in JIRA.

Would be better to have "UploadedFile#getFieldName" or also extend
"UploadedFilesAware" interface and add
"withFieldNamesAndUploadedFiles(Map<String, List<UploadedFile>>
uploadedFiles)"?


Cheers
Łukasz
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.