v0.1 add check mimetype if mimetype of file is undefined

This commit is contained in:
Miloš Holba
2020-09-06 20:29:16 +02:00
committed by Peter Papp
parent f3254a380f
commit 0d7b920cbe
5 changed files with 13 additions and 10 deletions
+3 -3
View File
@@ -25,9 +25,9 @@ class MimetypeBlacklistValidation implements Rule
public function passes($attribute, $value)
{
$mimetype_blacklist = explode(',' ,get_setting('mimetypes_blacklist'));
$fileMimetype = explode('/' ,$value->getMimeType());
return !array_intersect($fileMimetype , $mimetype_blacklist);
$file_mimetype = explode('/' ,$value->getMimeType());
return !array_intersect($file_mimetype , $mimetype_blacklist);
}
/**