1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11912] Supply filename to content_guesser for guessing on windows

The filename of the files sent to the guesser by plupload do not contain
the file extension. Therefore, it's impossible to guess the mimetype if
only the content_guesser is available and the function mime_content_type()
doesn't exist. By supplying the filename we can circumvent this issue.

PHPBB3-11912
This commit is contained in:
Marc Alexander
2013-10-24 12:05:00 +02:00
parent 24099583a3
commit bc7ff47537
4 changed files with 17 additions and 8 deletions

View File

@@ -135,7 +135,7 @@ class plupload
'tmp_name' => $file_path,
'name' => $this->request->variable('real_filename', ''),
'size' => filesize($file_path),
'type' => $this->mimetype_guesser->guess($file_path),
'type' => $this->mimetype_guesser->guess($file_path, $file_name),
);
}
else