struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Birch <>
Subject RE: Multiple file upload?
Date Tue, 20 Aug 2002 05:14:29 GMT

Other than the problem with struts and the same file-name... I need the same implementation
for an
application I'm writing.

I wrote a prototype where you choose at run-time how many upload boxes you want on a form
will get set in an indexed property FormFile[]), then the struts Action simply prints out
contents of each file.

This app works fine in IE 6 and Mozilla 1.0

I'm testing it later today in Netscape 4.x and IE... (from your e-mail it doesn't sound possible
in Netscape)

> > While the user can upload all the files at one go, they may 
> > have stuffed up
> > one of the other fields for validation and get sent back to 
> > the view. If
> > this happens I dont want them to have to upload all the files 
> > again. I also
> > need to provide an option to discard an uploaded file should 
> > the user have
> > second thoughts when they get back from a failed validation.

Why don't you put each uploaded file into a table with checkboxes for removal and have only
enough file upload form tags for files that weren't uploaded?


you've already uploaded:
file      |    remove:
file1.txt |    x
file2.txt |    o



> I believe it's supported by HTML, although I've never tried it. However, the
> Struts file upload handlers do not currently support it. Each successive
> file item with the same name will overwrite the previous one. However, it
> should be fixable so that it works the same way as text items, where the
> result is an array, as you suggest. If you need that, please file a bug
> report.

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

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

View raw message