diff --git a/htdocs/core/ajax/flowjs-server.php b/htdocs/core/ajax/flowjs-server.php index cb66ad884ae..918871421d3 100644 --- a/htdocs/core/ajax/flowjs-server.php +++ b/htdocs/core/ajax/flowjs-server.php @@ -80,7 +80,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { } } else { // loop through files and move the chunks to a temporarily created directory - if (!empty($_FILES)) foreach ($_FILES as $file) { + if (file_exists($upload_dir.'/'.$flowFilename)) { + echo json_encode('File '.$flowIdentifier.' was already uploaded'); + header("HTTP/1.0 200 Ok"); + } else if (!empty($_FILES)) foreach ($_FILES as $file) { // check the error status if ($file['error'] != 0) { dol_syslog('error '.$file['error'].' in file '.$flowFilename);