commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Tompkins (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FILEUPLOAD-74) [fileupload] Model FileUpload model to mimic javax.servlet.Request
Date Tue, 06 Jun 2017 04:58:18 GMT

     [ https://issues.apache.org/jira/browse/FILEUPLOAD-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Tompkins closed FILEUPLOAD-74.
----------------------------------

Won't fix.

> [fileupload] Model FileUpload model to mimic javax.servlet.Request
> ------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-74
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-74
>             Project: Commons FileUpload
>          Issue Type: Improvement
>    Affects Versions: 1.0 Final
>         Environment: Operating System: other
> Platform: All
>            Reporter: Will Stranathan
>            Priority: Minor
>         Attachments: ASF.LICENSE.NOT.GRANTED--AbstractMultipartParameter.java, ASF.LICENSE.NOT.GRANTED--AbstractMultipartRequest.java,
ASF.LICENSE.NOT.GRANTED--docmp.zip, ASF.LICENSE.NOT.GRANTED--FileUploadBase.java.patch, ASF.LICENSE.NOT.GRANTED--FileUploadBase.java.patch,
ASF.LICENSE.NOT.GRANTED--FileUploadBase.java.patch, ASF.LICENSE.NOT.GRANTED--FileUploadFilter.java,
ASF.LICENSE.NOT.GRANTED--FileUploadFilter.java, ASF.LICENSE.NOT.GRANTED--FileUploadRequest.java,
ASF.LICENSE.NOT.GRANTED--FileUploadServletRequest.java, ASF.LICENSE.NOT.GRANTED--FileUploadServletRequestWrapper.java,
ASF.LICENSE.NOT.GRANTED--filter.patch, ASF.LICENSE.NOT.GRANTED--StandardFileUploadServletRequest.java,
ASF.LICENSE.NOT.GRANTED--TransientParameter.java, ASF.LICENSE.NOT.GRANTED--TransientRequest.java,
ASF.LICENSE.NOT.GRANTED--UploadServlet.java
>
>
> Request to make the API more consistent with the getParameter(String name) and 
> getParameterValues(String name) models of javax.servlet.Request.
> 1) For FileUpload to have getParemeter(String name) or getParameterValues
> (String name) - should implemented on top of the current API so that there are 
> no backward-compatibility issues. 
> 2) At LEAST working out a kink where multi-valued parameters actually appear as 
> separate FileItems with the same value returned by getFieldName(). 
> Example of new model: 
> DiskFileUpload upload = new DiskFileUpload(); 
> // Now, rather than applying an Iterator to parseRequest, 
> // call the same method, but pull the individual items from the 
> // DiskFileUpload object itself 
> upload.parseRequest(request); 
> FileItem myfile = (FileItem)upload.getParameter("myfile"); 
> // And this looks ALMOST like ServletRequest.getParameter(String name) 
> String lastname = (String)upload.getParameter("lastname"); 
> String[] favoriteColours = upload.getParameterValues("favoritecolours"); 
> Alternately, a getFileItem(String name) method could be added in order to 
> shield the user from having to cast the result of getParameter(String name) to 
> a FileItem - and this same method could wrap ordinary field values in FileItems 
> similarly to the way they are returned in the Iterator.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message