I don't have access to the code right now...  but what I did was in my form
object I had a single FormFile which handled each individual upload, then
when they hit the import button I put that Formfile into a list of
FormFiles.  On the gui, I displayed the list of FormFiles and I maintained
the list in my form object.

-----Original Message-----
From: Jagadeesan,Sivakumar [mailto:[EMAIL PROTECTED]
Sent: Friday, March 28, 2003 2:23 PM
To: 'Struts Users Mailing List'
Subject: RE: How to upload multiple files??


Thanx Becky and Eva:

I think I will use an interface using Javascript and allow the user to add
or remove a file.
Eva it would be great if you could share your code. 

So in my formBean , I will be havin

        public void setFiles(FormFile [ ] formFiles) ;
        
        public FormFile[] getFiles;

rite?

--Siva Jagadeesan

-----Original Message-----
From: Becky Norum [mailto:[EMAIL PROTECTED]
Sent: Friday, March 28, 2003 1:07 PM
To: Struts Users Mailing List
Subject: RE: How to upload multiple files??



> Hi All:
> 
> I have requirement that the user could upload more then one file.
Something
> like attachments in a mail?
> 
> How could I achieve this?
> 
> I know I could use
>   <html:file property="file" />
> 
> to upload a single file.
> 
> I need to extend this for multiple files
> 
> --Siva Jagadeesan

Siva,

You can have multiple file upload fields.
In my application, I have a default of 3.

You can actually write some Javascript to ask the user how many files
to upload and alter the number of file fields on the page based on that.

Have the property "file" be an array --> file[0], file[1], etc.

Becky


---------------------------------------------------------------------
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