You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Jochen Wiedmann (JIRA)" <ji...@apache.org> on 2007/04/07 03:51:32 UTC
[jira] Resolved: (FILEUPLOAD-74) [fileupload] Model FileUpload
model to mimic javax.servlet.Request
[ https://issues.apache.org/jira/browse/FILEUPLOAD-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Wiedmann resolved FILEUPLOAD-74.
---------------------------------------
Resolution: Won't Fix
See my previous comment.
> [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: AbstractMultipartParameter.java, AbstractMultipartRequest.java, docmp.zip, FileUploadBase.java.patch, FileUploadBase.java.patch, FileUploadBase.java.patch, FileUploadFilter.java, FileUploadFilter.java, FileUploadRequest.java, FileUploadServletRequest.java, FileUploadServletRequestWrapper.java, filter.patch, StandardFileUploadServletRequest.java, TransientParameter.java, TransientRequest.java, 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org