Image check
This commit is contained in:
@@ -12,7 +12,7 @@ $target_file = $target_dir . $hashed_name . ".$imageFileType";
|
|||||||
|
|
||||||
$uploadOk = 1;
|
$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"])) {
|
if(isset($_POST["submit"])) {
|
||||||
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
|
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
|
||||||
if($check !== false) {
|
if($check !== false) {
|
||||||
@@ -23,6 +23,8 @@ if(isset($_POST["submit"])) {
|
|||||||
$uploadOk = 0;
|
$uploadOk = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Check if file already exists
|
// Check if file already exists
|
||||||
if (file_exists($target_file)) {
|
if (file_exists($target_file)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user