mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/13031] Slightly change behavior of choose_mime_type and add unit tests [ticket/13031] Guess with all mimetype guessers and pick best guess [ticket/13031] Only use mimetype guesser guess if it helps us
This commit is contained in:
@@ -232,7 +232,12 @@ class filespec
|
||||
{
|
||||
if ($this->mimetype_guesser !== null)
|
||||
{
|
||||
$this->mimetype = $this->mimetype_guesser->guess($filename);
|
||||
$mimetype = $this->mimetype_guesser->guess($filename, $this->uploadname);
|
||||
|
||||
if ($mimetype !== 'application/octet-stream')
|
||||
{
|
||||
$this->mimetype = $mimetype;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->mimetype;
|
||||
|
Reference in New Issue
Block a user