add verification if file already uploaded
This commit is contained in:
parent
8fe9ebf5be
commit
b9e3cd9812
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user