struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filippo Munafò (JIRA) <>
Subject [jira] [Commented] (WW-4609) Getting access to fileitem objects through MultiPartRequestWrapper
Date Thu, 03 Mar 2016 17:26:18 GMT


Filippo Munafò commented on WW-4609:

You all are right, I agree with you, it's not a good idea to introduce a dependency on the
FileUpload lib.
But I'm sure that you agree with me that is very tedious to invoke getFileParameterNames,
getContentTypes, getFileNames and getFiles to access everything that comes with the file upload.
Consider also that application code is using fileitem instances, so we have two options:

- create again a fileitem, using DiskFileItemFactory and so on...
- do the same as FileUploadInterceptor does and change all application code that unitl now
is using FileItem

Any suggestion?


> Getting access to fileitem objects through MultiPartRequestWrapper
> ------------------------------------------------------------------
>                 Key: WW-4609
>                 URL:
>             Project: Struts 2
>          Issue Type: Improvement
>            Reporter: Filippo Munafò
>             Fix For: 2.3.25, 2.5
> Can you please change the MultiPartRequestWrapper, and the
> JakartaMultiPartRequest, adding a new method? The signature should be:
> public List<FileItem> getFileItems(String)
> Our action ancestor class needs to get access to the "files" properties of JakartaMultiPartRequest
through the MultiPartRequestWrapper. Otherwise we need to code something similar to what is
done by the FileUploadInterceptor.intercept and create again the fileitem needed by our application

This message was sent by Atlassian JIRA

View raw message