Improved Mime Type detection

This commit is contained in:
Michael 2020-04-01 05:42:44 +00:00
parent 248a7fa48a
commit d3722c945b
9 changed files with 89 additions and 102 deletions

View file

@ -52,9 +52,8 @@ class Index extends BaseSettings
$filename = basename($_FILES['userfile']['name']);
$filesize = intval($_FILES['userfile']['size']);
$filetype = $_FILES['userfile']['type'];
if ($filetype == '') {
$filetype = Images::guessType($filename);
}
$filetype = Images::getMimeTypeBySource($src, $filename, $filetype);
$maximagesize = DI::config()->get('system', 'maximagesize', 0);