myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manfred Geiler" <manfred.gei...@gmail.com>
Subject Re: [Trinidad] inputFile - upload empty files ?
Date Mon, 29 Oct 2007 15:47:38 GMT
Matze,
What about providing a standard <tr:validateNonEmptyFile> Vaidator.
This would make everybody happy, right?

lg,
Manfred


On 10/29/07, Andrew Robinson <andrew.rw.robinson@gmail.com> wrote:
> Strong -1 on this
>
> 0 byte files are very valid, especially on a unix based platform.
> There are many times that a file by its existence implies meaning.
> Take for example "~/.config/xserver-xgl/disable", if this file is
> present, xgl mode of the linux X server is disabled for that user. The
> file should be empty. This is just one small example.
>
> If an application doesn't want to support 0 byte files, it should use
> a validator or actionListener method to check the length.
>
> -Andrew
>
> On 10/29/07, Matthias Wessendorf <matzew@apache.org> wrote:
> > Hi,
> >
> > currently Trinidad's inputFile allows the upload of an empty file (0 bytes).
> > I think it shouldn't. When an inputFile object is marked as required,
> > I would expect that a user
> > does a real upload, and not a fake upload.
> >
> > Sure, an app-dev could write a validation method, but I think 0-byte
> > is somewhat equal to "not submitted".
> >
> > WDYT ?
> >
> > -M
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > mail: matzew-at-apache-dot-org
> >
>


-- 
http://www.irian.at
Your JSF powerhouse - JSF Consulting,
Development and Courses in English and
German

Professional Support for Apache MyFaces

Mime
View raw message