Improved Mime Type detection

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

View file

@ -706,9 +706,7 @@ function photos_post(App $a)
return;
}
if ($type == "") {
$type = Images::guessType($filename);
}
$type = Images::getMimeTypeBySource($src, $filename, $type);
Logger::log('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', Logger::DEBUG);