mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
Add protection on upload if file already exists
This commit is contained in:
@@ -79,7 +79,7 @@ if ($_POST["sendit"] && $conf->upload)
|
||||
|
||||
if (is_dir($upload_dir))
|
||||
{
|
||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name']))
|
||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
||||
{
|
||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||
//print_r($_FILES);
|
||||
|
||||
Reference in New Issue
Block a user