"Is an empty file (0 bytes) equal to "no file" (ie. null)?"
is the same as
"Is an empty String (length 0) equal to "no String" (ie. null)?"

Technically the answer is "no" for both questions.
Well the pragmatical (and only reasonable) answer to the second
question is "yes" in the JSF spec (comp. "required" for h:inputText).
Therefore it makes sense to say "yes" to Q1 as well.

+1 to mark 0-byte uploads as errorneous if required==true

--Manfred



On 10/29/07, Matthias Wessendorf <[EMAIL PROTECTED]> 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
>

Reply via email to