note 69531 deleted from function.move-uploaded-file by betz
| From: | betz@php.net | Date: | Sun, 10 Sep 2006 10:13:50 +0000 |
| Subject: | note 69531 deleted from function.move-uploaded-file by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116981@lists.php.net to get a copy of this message | ||
Note Submitter: cameron
----
In response to theprocrastinator's contribution 2 notes down, don't forget the same user
actually could be uploading more than one document at the same time, if the form contained multiple
"file" input elements.
Consider an application that allows users to upload multiple photos for a project - they would all
have the same (username_timestamp.jpg) filename.
The solution is to tack on an additional piece, namely the index of each upload in the
$_FILE['blahblah']['name'] array, so that each file is named:
username_timestamp_0.jpg
username_timestamp_1.jpg
...etc...
Simple enough.