> I don't know if this possibility has been discussed or sounds useful to
> anybody else.  I'll be happy to contribute where I can if there is any
other
> interest in this change.

First let me say that I am also very pleased with the FileUpload tool.
In addition, I agree with Will. I think that having access to the request
parameters via a getParameter() and/or  getParameterValues() call is the way
to go.I too would find this functionality useful and I would be willing to
aid in the effort as a contributor.

-----Original Message-----
From: Martin Cooper [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 1:31 AM
To: Jakarta Commons Developers List
Subject: Re: [fileiupload] Remodeling of parseRequest?




On Wed, 4 Jun 2003, Will Stranathan wrote:

> I REALLY like the FileUpload tool - have had great success with RC1, and
> look forward to a production release.

Glad you like it!

> However, I'm curious if the possibility of making the API model more
> consistent with the Request model of the Servlet API.  There are a couple
of
> things that I think would be handy in this regard:

These are some interesting ideas. Would you mind adding this as an
enhancement
request in Bugzilla?

http://nagoya.apache.org/bugzilla/

That will ensure that your ideas don't get lost/forgotten when we start
looking at the next release.

Thanks for your feedback!

--
Martin Cooper


>
> 1) For FileUpload to have getParemeter(String name) or
> getParameterValues(String name) - I think this can be implemented on top
of
> the current API so that there are no backward-compatibility issues.
> 2) At LEAST working out a kink (IMHO) where multi-valued parameters
actually
> appear as separate FileItems with the same value returned by
getFieldName().
>
> I suppose what I propose would look something like this:
>
> DiskFileUpload upload = new DiskFileUpload();
> // Now, rather than applying an Iterator to parseRequest,
> // we still 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.
>
> I don't know if this possibility has been discussed or sounds useful to
> anybody else.  I'll be happy to contribute where I can if there is any
other
> interest in this change.
>
> Regards,
> Will Stranathan
>
> _________________________________________________________________
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to