diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_upload.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index a0a67ccf3d..ae04fe737c 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -232,7 +232,12 @@ class filespec { if ($this->mimetype_guesser !== null) { - $this->mimetype = $this->mimetype_guesser->guess($filename); + $mimetype = $this->mimetype_guesser->guess($filename); + + if (empty($this->mimetype) || $mimetype !== 'application/octet-stream') + { + $this->mimetype = $mimetype; + } } return $this->mimetype; |