struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Multiple file uploads
Date Fri, 16 Apr 2004 12:19:02 GMT

We have handled a situation like this by giving the user the option to
upload a single file or a zip/jar file of multiple files and the providing
a checkbox for them to indicate if the file should be extracted or not.  Of
course this approach depends on the user having the ability to zip/jar a
file and may not be possible in some cases.  Just another idea for you.


             "Andrew Hill"                                                 
   >                                            To 
                                       "Struts Users Mailing List"         
             04/16/2004 03:00          <>            
             AM                                                         cc 
             Please respond to         RE: Multiple file uploads           
               "Struts Users                                               
               Mailing List"                                               

Search the archive and you will find I have explained a technique that
involves the use of a single FormFile setter, a session scoped form, and a
list, with the user uploading 1 file at a time to the field, submitting it,
and being returned to the form with a list of files uploaded so far and a
box to upload the next one...

You arent necessarily limited by compile considerations as you could put
FormFile property on a nested bean in a collection... (but uploading 100s
files in one single shot is not going to be fun for the user!)

-----Original Message-----
From: Andrew Stevens []
Sent: Friday, 16 April 2004 13:37
To: ''
Subject: Multiple file uploads


I've read various threads on this mailing list about uploading files, and
uploading MULTIPLE files. There seems to be some shortcomings.
Especially as I want to offer a theoretically infinite number of file
uploads in one form. 0 to 5 files is realistic. But I don't want to limit

My understanding is that I will have to limit this because for each file
I'll need a getter and setter in my ActionForm.
ie: setFile1() setFile2() setFile3().

So... the compile of my ActionForm creates a limit on the number of files
able to be uploaded.

Is there no other way to do this?

Thanks in advance,


Goldman Sachs JBWere Pty Ltd and its related entities distributing this
document and each of their respective directors, officers and agents ("the
Goldman Sachs JBWere Group") believe that the information contained in this
document is correct and that any estimates, opinions, conclusions or
recommendations contained in this document are reasonably held or made as
the time of compilation.  However, no warranty is made as to the accuracy
reliability of any estimates, opinions, conclusions, recommendations (which
may change without notice) or other information contained in this document
and, to the maximum extent permitted by law, the Goldman Sachs JBWere Group
disclaims all liability and responsibility for any direct or indirect loss
or damage which may be suffered by any recipient through relying on
contained or omitted from this document.

Goldman Sachs JBWere does not represent or warrant the attached files are
free from computer viruses or other defects.  The attached files are
provided, and may only be used, on the basis that the user assumes all
responsibility for any loss, damage or consequence resulting directly or
indirectly from use.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message