commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xephyrus" <xephy...@xephyrus.com>
Subject Re: [fileupload] access to non-file-related parameters?
Date Sat, 15 Mar 2003 19:22:58 GMT
>> For example, if I have an upload form that accepts the filename to
>> upload (via a normal file-type input tag) and a description of that
>> file (via a textarea, let's say), there's no way to retrieve the
>> description.
>
> The parseRequest() method returns a list of *all* the parameters in the
> request. In the case you describe, there would be two items in the
> list, one for the uploaded file and another for the description. You
> can access the text of your description with something like this:
>
>    if (item.isFormField() && "description".equals(item.getFieldName()))
>    {
>        String description = item.getString();
>        // Do what you want with the description.
>    }


Ah,  I had been wondering about that isFormField method.  Thanks.


.  Topher



Mime
View raw message