Image check

This commit is contained in:
Senad Uka
2020-09-01 16:43:23 +02:00
parent cf145eb74e
commit ac24e9cdaf

View File

@@ -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)) {