Added mime check to svg check so that it doesn't try to load every upload into memory
This commit is contained in:
parent
152e55b5db
commit
30761e6d1f
1 changed files with 4 additions and 0 deletions
|
@ -67,6 +67,10 @@ class SVGFileHandler extends DataHandlerExtension
|
|||
|
||||
protected function check_contents(string $file): bool
|
||||
{
|
||||
if (getMimeType($file)!="image/svg+xml") {
|
||||
return false;
|
||||
}
|
||||
|
||||
$msp = new MiniSVGParser($file);
|
||||
return bool_escape($msp->valid);
|
||||
}
|
||||
|
|
Reference in a new issue