You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by je...@scdi.com on 2003/04/04 21:49:39 UTC

File upload Validator

Hi all!

I have development/design question. Please do not read it as a 
atack of any kind. I jsut try to understand what I am missing. Beacuse 
obviously I am missing something.

First an only question: why org.apache.struts.upload.FormFile is 
not on the list of types suported by 
org.apache.struts.validator.DynaActionForm?

I believe that it will be nice to have possibility of building dynamic 
form with file upload. Specially that it works already! 

The only part which is not implemented is the validator of the file 
size.

This will be nice to have such validator. Of course there is small 
draw back - we cannot validate size of uploaded file on the JavaScript 
side (but who said that we have to).

I believe that this will add the flexibility to the existing 
"official" way (based on struts-upload examlpe) and simplify the page 
development.

I already developed such validator. 

If somebody think that it can be a good idea to add it after testing 
to org.apache.struts.validator.FieldChecks or make any use of this - I 
will be happy to send the solution to whoever wish to take a look. 

It works for me for any form which implements 
org.apache.commons.beanutils.DynaBean and any form which has geters 
and seters set the standard way.

Best regards

Jerzy Puchala


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