mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
Improved Mime Type detection
This commit is contained in:
parent
248a7fa48a
commit
d3722c945b
9 changed files with 89 additions and 102 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue