Good morning,
I need to process a form which contains a variable number of file upload
and other input fields.
As far as I know I can use the following code to create an array of
strings for text fields like this:
<input type="text" name="myText[1]" ...
<input type="text" name="myText[2]" ...
...
But using Google I only found the information that this is not possible
for file upload fields because Struts doesn't support this array method
for FormFiles.
How can I process multiple file uploads if I don't know their number
before? (Because of the fact that the form structure depends on a
recursive data structure I don't even know the maximum number of
existing file uploads before page generation).
Thank you for hints,
Jens
Manish Pandit - 18 Jun 2007 06:40 GMT
> Good morning,
>
[quoted text clipped - 18 lines]
> Thank you for hints,
> Jens
You can use jakarta fileupload API (http://jakarta.apache.org/commons/
fileupload/) to do this. I posted quite a few messages on this topic
in the past, you can search on cljp and should get more information.
This API is simple API to handle multipart forms including multiple
file uploads.
-cheers,
Manish