myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: [Trinidad] inputFile - upload empty files ?
Date Mon, 29 Oct 2007 15:43:56 GMT
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
>

Mime
View raw message