This commit is contained in:
Laurent Destailleur
2024-09-26 03:34:32 +02:00
parent 4ea503f366
commit a8cb076bbd

View File

@@ -805,10 +805,9 @@ class Documents extends DolibarrApi
throw new RestException(500, "Refused to deliver file ".$dest_file);
}
$result = dol_move($destfiletmp, $destfile, 0, $overwriteifexists, 1, 1);
$result = dol_move($destfiletmp, $dest_file, 0, $overwriteifexists, 1, 1);
if (!$result) {
throw new RestException(500, "Failed to move file into '".$destfile."'");
throw new RestException(500, "Failed to move file into '".$dest_file."'");
}
return dol_basename($destfile);