vol30w60 escribió:
Quote:
A web form with some basic fields (name, address, etc.) plus a file
upload field. If the user forgets to fill in a required field (eg,
name), I show the form again, requesting them to fill in the required
field. We don't want to force them to enter everything again, so the
other fields have been pre-filled with their information (using the
value= attribute) -- however this does not work for the file upload.
Apart from security considerations and browsers implementations, it just
wouldn't make sense in your case. That way you would force the user to
upload the same file again.
You can save the file to a temporary location (typically with a random
name) and add a hidden field with the file name (path not necessary) and
a visible label with the original fila name. Use the first field to
recover the file when data is okay and the second one to let the user
know there file is okay. When you have everything, move the file to the
final location. Clean up the temp folder one in a while.
--
--
http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
http://bits.demogracia.com
-- Mi web de humor al baño María:
http://www.demogracia.com
--