Redisplay file name on failed upload
| From: | Miles Thompson | Date: | Tue, 13 Feb 2007 19:51:11 +0000 |
| Subject: | Redisplay file name on failed upload | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-248825@lists.php.net to get a copy of this message | ||
When a file upload fails, not because of a problem with the upload itself,
is there anyway of assigning the value captured by
<input name="upldFile" type="file">
when the form is redisplayed?
The failure may not be due to a problem with the file being uploaded, but
because the user failed to complete a keywords field or some other bit of
wanted information.
Is it possible to assign form[ upldFile ] = "C:\somepath\somefile"
or
form[ upldFile ] = $_FILES['userfile']['name']
The script which does the validation is the same one which contains the
upload form. I suspect we're completely out of luck - apart from validating
with JavaScript.
Regards - Miles