1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 22:40:39 +02:00

[ticket/13031] Guess with all mimetype guessers and pick best guess

PHPBB3-13031
This commit is contained in:
Marc Alexander
2014-09-04 22:32:08 +02:00
parent 7de15bc54c
commit d31ff51785
2 changed files with 34 additions and 9 deletions

View File

@@ -232,9 +232,9 @@ class filespec
{
if ($this->mimetype_guesser !== null)
{
$mimetype = $this->mimetype_guesser->guess($filename);
$mimetype = $this->mimetype_guesser->guess($filename, $this->uploadname);
if (empty($this->mimetype) || $mimetype !== 'application/octet-stream')
if ($mimetype !== 'application/octet-stream')
{
$this->mimetype = $mimetype;
}