[ 
https://issues.apache.org/jira/browse/WW-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15175983#comment-15175983
 ] 

victorsosa commented on WW-4609:
--------------------------------

I think we can't return a FileItem because this create a strong dependency on 
the FileUpload lib.  FileItem is a class from FileUpload commons.

Also you have 

public File[] getFile(String fieldName)

which return the file on  JakartaMultiPartRequest through the 
MultiPartRequestWrapper.

In this case the implementation shouldn't go out in the interface because you 
shouldn't be using a FileItem from FileUpload commons lib when you are using 
Struts2, it's that make sense.



> Getting access to fileitem objects through MultiPartRequestWrapper
> ------------------------------------------------------------------
>
>                 Key: WW-4609
>                 URL: https://issues.apache.org/jira/browse/WW-4609
>             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 code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to