You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kiran Badi <ki...@poonam.org> on 2012/07/12 01:29:50 UTC

Apache File Upload - Create class and reuse it

Hi ,
I am currently using apache file upload to upload around 10 Images per 
form and this solution seems to be working perfecly for me in case if I 
pull all the values of the form in the single servlet.

Now I was thinking of making a  class for just file upload and then 
reuse it across other forms.I have close to 25 form fields and out of 
these 10 are file input fields.Can someone suggest me some better way of 
doing this.One of the options I was thinking of breaking the existing 
form in 2 parts one with plain form and pull the values via 
request.getparameter and then image upload form with multipart enc.I 
store the images in the file drive and then add image name to the 
DB.Currently I have a single table for 25 fields and breaking up the 
form might break my table structure as well.Being new to all these 
things, I am running short of any ideas.Can someone help me here.

I am subscribed to apache file upload,so believe I might receive some 
help here.

- Kiran Badi


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: Apache File Upload - Create class and reuse it

Posted by Indudhar Devanath <in...@gmail.com>.
I am not sure why anyone wants to upload 10 image files in one form
submit!  But assuming the business requirement is to blame, yes, you can do
as you explained below.

If I were you, I would split the file uploads to one (or max 2) per request
(or form submit, as in your case). If the user is connecting to the app on
a low bandwidth network, uploading 10 files and 15 other relevant
information in one form submit can take quite a while.  If the user doesn't
get a feedback soon, they might get disenchanted and cancel out.

Indu

On 12 July 2012 04:59, Kiran Badi <ki...@poonam.org> wrote:

> Hi ,
> I am currently using apache file upload to upload around 10 Images per
> form and this solution seems to be working perfecly for me in case if I
> pull all the values of the form in the single servlet.
>
> Now I was thinking of making a  class for just file upload and then reuse
> it across other forms.I have close to 25 form fields and out of these 10
> are file input fields.Can someone suggest me some better way of doing
> this.One of the options I was thinking of breaking the existing form in 2
> parts one with plain form and pull the values via request.getparameter and
> then image upload form with multipart enc.I store the images in the file
> drive and then add image name to the DB.Currently I have a single table for
> 25 fields and breaking up the form might break my table structure as
> well.Being new to all these things, I am running short of any ideas.Can
> someone help me here.
>
> I am subscribed to apache file upload,so believe I might receive some help
> here.
>
> - Kiran Badi
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@commons.**apache.org<us...@commons.apache.org>
> For additional commands, e-mail: user-help@commons.apache.org
>
>