struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Re: AW: AW: Multi-select file chooser
Date Mon, 28 Feb 2005 23:42:20 GMT
Just in case there was any doubt, here's the form from my web hosts' 
file manager I was referring to:

<form action="doupload.html" method=POST ENCTYPE="multipart/form-data" 
target=infofr>
   <input type="file" name="file1">
   <input type="file" name="file2">
   <input type="file" name="file3">
   <input type="file" name="file4">
   <input type="file" name="file5">
   <input type="file" name="file6">
   <input type="file" name="file7">
   <input type="file" name="file8">
   <input type="file" name="file9">
   <input type="file" name="file10">
   <input type="file" name="file11">
   <input type="file" name="file12">
    <br>
   Overwrite existing files:
   <input type="checkbox" name="overwrite" value="1">
   <br>
   <input type="submit" value="Upload">
</form>

I could think of some better ways to do present the UI, but that's the 
basic idea.  Heck, throw that in a .tag file and your all set (in a 
basic way).

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


Günther Wieser wrote:
> another solution would be to use (signed) java applets, which is (for the
> enduser) the best looking solution, but the effort to do so is REALLY BIG,
> so if you don't get paid like mad forget it....
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Frank W. Zammetti [mailto:fzlists@omnytex.com] 
> Gesendet: Dienstag, 01. März 2005 00:29
> An: Struts Users Mailing List
> Cc: werner@sonoma.edu
> Betreff: Re: AW: Multi-select file chooser
> 
> You can have as many <file> elements in a form as you want, and you can
> process them all at once.  My web host (LunarPages) has a decent file
> manager, one of the functions it has is the ability to upload up to 12 files
> at a time.
> 
> I don't know of any single tag to render such a form, but that's really what
> you need, and it should be trivial to write (although I'd bet it exists
> somewhere).  It's the server-side processing that *could* be tricky
> (although I think Commons Upload would deal with it just fine, probably give
> you a collection or something, I forget what the interface looks like.)
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> Günther Wieser wrote:
> 
>>this is standard browser behaviour, haven't seen any browser who would 
>>allow you to select more than one file.
>>reason for that is that your form only includes one form field of type 
>>file, so how can the browser add more than one file in a way that your 
>>app understands this?
>>
>>the only chance for multiple file selection is to ask the user before 
>>generation of the form "how many files do you want to upload", or by 
>>adding another file field to the form as soon as the user selects one 
>>(using javascript; but this is quite ugly and can make a lot of 
>>troubles with different browser or javascript-disabled ones...) or 
>>he/she upload a zip file...
>>
>>if there is someone outside who knows a better solution, let us know, 
>>this is a very common problem.
>>
>>kr,
>>guenther
>>
>>-----Ursprüngliche Nachricht-----
>>Von: Nic Werner [mailto:werner@sonoma.edu]
>>Gesendet: Dienstag, 01. März 2005 00:17
>>An: Struts Users Mailing List
>>Betreff: Re: Multi-select file chooser
>>
>>Wow, what browser is that? Can they hold down CTRL? (assuming Windows)
>>
>>Rakefet Bitton wrote:
>>
>>
>>
>>>Hi, I'm using the "file" tag to select a file from my jsp. The default 
>>>browser allows the user to select only 1 file at a time. The user can 
>>>not multi select files or a directory.
>>>
>>>Does anyone know of a multi-select file and directory chooser?
>>>
>>>Thanks very much.
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>>
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 
> 
> 



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


Mime
View raw message