1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 05:34:01 +02:00

[ticket/11912] Add content_guesser

The content_guesser will try to use the function mime_content_type()
if it's available. If that is not the case, the content_guesser will try to
guess the mimetype using the file extension of the supplied file.
Since this guesser will be registered after the other guessers, it will
be only used if the other guessers are not available.

PHPBB3-11912
This commit is contained in:
Marc Alexander
2013-10-23 23:11:33 +02:00
parent c8040024cb
commit 63945f3687
2 changed files with 556 additions and 0 deletions

View File

@@ -9,6 +9,14 @@ services:
tags:
- { name: mimetype.guessers }
mimetype.content_guesser:
class: phpbb\mimetype\content_guesser
arguments:
- %core.root_path%
- @php_ini
tags:
- { name: mimetype.guessers }
mimetype.guesser_collection:
class: phpbb\di\service_collection
arguments: