Added mime check to svg check so that it doesn't try to load every upload into memory

This commit is contained in:
Matthew Barbour 2020-02-24 14:29:27 +00:00
parent 152e55b5db
commit 30761e6d1f

View file

@ -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);
}