From ac24e9cdaf309fa7391283dc18ea68fdccfc0dc0 Mon Sep 17 00:00:00 2001 From: Senad Uka Date: Tue, 1 Sep 2020 16:43:23 +0200 Subject: [PATCH] Image check --- admin/upload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/upload.php b/admin/upload.php index 99b6f27..589e08d 100644 --- a/admin/upload.php +++ b/admin/upload.php @@ -12,7 +12,7 @@ $target_file = $target_dir . $hashed_name . ".$imageFileType"; $uploadOk = 1; -// Check if image file is a actual image or fake image +/* Check if image file is a actual image or fake image if(isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if($check !== false) { @@ -23,6 +23,8 @@ if(isset($_POST["submit"])) { $uploadOk = 0; } } + */ + // Check if file already exists if (file_exists($target_file)) {