Révision 2858c9fe
Ajouté par Jocelyn Delande il y a presque 11 ans
uploadReceive.php | ||
---|---|---|
2 | 2 |
|
3 | 3 |
require_once('class/FormValidator.class.php'); |
4 | 4 |
require_once('class/site_point.class.php'); |
5 |
require_once('class/utils.class.php'); |
|
5 | 6 |
require_once('constants.inc.php'); |
6 | 7 |
|
7 | 8 |
class UploadReceiveError extends Exception {} |
... | ... | |
19 | 20 |
foreach ($_FILES['files']['name'] as $i => $file) { |
20 | 21 |
$file_err = $_FILES['files']['error'][$i]; |
21 | 22 |
$file_tmp = $_FILES['files']['tmp_name'][$i]; |
22 |
$file_finalpath = UPLOAD_PATH.'/'.basename($file);
|
|
23 |
$file_finalpath = utils::get_unique_filepath(UPLOAD_PATH.'/'.basename($file));
|
|
23 | 24 |
|
24 | 25 |
if(!empty($file)) { |
25 | 26 |
if(isset($file) && UPLOAD_ERR_OK === $file_err) { |
Formats disponibles : Unified diff
allow upload with same names