You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Sylvain Vieujot <sv...@apache.org> on 2004/11/02 02:58:50 UTC

Fileupload failed validation problem

The fileupload is special in that if the process validations step fails,
the name of the file to upload is lost when the page renders again as
the value attribute of an <input type="file"> is ignored by the browser
for security reasons.

This feels like a bug for a user as it uploaded the file already, and if
the validation of the form failed because another field didn't validate,
the uploaded data are lost and he has to select again the file to
upload.

I thought this could be fixed by using immediate="true" for the
x:inputFileUpload tag, as this would still update the model with the
uploaded values, but it seems this isn't how it works.
At least, I couldn't make this work.

Any idea on how to solve that ?

Sylvain.