Re: Process multiple uploaded files individually
Florian Schlittgen <[email protected]>
| Newsgroups | gmane.comp.jakarta.struts.user |
|---|---|
| Organization | Dr. Lippke & Dr. Wagner GmbH |
| Message-ID | <[email protected]> |
Thank you for the quick reply, I will register a bug in JIRA then. In my opinion, since the class "UploadedFile" represents exactly what it is named (an uploaded file) and the input name is part of the multipart request, "inputName" should be included as a class member. This keeps the "UploadedFilesAware" interface clean and "inputName" can be used in the action if required without having to change the API. Cheers, Florian On 02.09.24 11:08, Lukasz Lenart wrote: > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
smime.p7s
(application/pkcs7-signature, 4.3 KB) - not displayed