DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20523>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20523 Model FileUpload model to mimic javax.servlet.Request Summary: Model FileUpload model to mimic javax.servlet.Request Product: Commons Version: 1.0 Final Platform: All OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: File Upload AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]