diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php index df5ea347d..518c67d0b 100644 --- a/e107_handlers/media_class.php +++ b/e107_handlers/media_class.php @@ -2047,15 +2047,15 @@ class e_media $chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0; $chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0; $fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : ''; - - // Clean the fileName for security reasons - $fileName = preg_replace('/[^\w\._]+/', '_', $fileName); - + if(!empty($_FILES['file']['name']) && $_FILES['file']['name'] !== 'blob' ) // dropzone support v2.1.9 { $fileName = $_FILES['file']['name']; } + // Clean the fileName for security reasons + $fileName = preg_replace('/[^\w\._]+/', '_', $fileName); + // $array = array("jsonrpc" => "2.0", "error" => array('code'=>$_FILES['file']['error'], 'message'=>'Failed to move file'), "id" => "id", 'data'=>$_FILES );