first
This commit is contained in:
@ -125,4 +125,12 @@ class Files
|
||||
}
|
||||
}
|
||||
|
||||
public static function isImageByExtension($filename): bool
|
||||
{
|
||||
$allowedExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'];
|
||||
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
|
||||
return in_array($extension, $allowedExtensions);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user