public verifyImageType ( Symfony\Component\HttpFoundation\File\UploadedFile $file ) : boolean | ||
$file | Symfony\Component\HttpFoundation\File\UploadedFile | |
return | boolean |
public function verifyImageType($file)
{
if (in_array($file->getMimeType(), static::$app['config']->get('cabinet::image_file_types')) || in_array(strtolower($file->getClientOriginalExtension()), static::$app['config']->get('cabinet::image_file_extensions'))) {
return true;
} else {
return false;
}
}