[FEATURE] Add SplFileInfo implementation to get file mimeType 56/31256/14
authorSascha Egerer <sascha.egerer@dkd.de>
Sat, 31 Jan 2015 23:17:56 +0000 (00:17 +0100)
committerSteffen Müller <typo3@t3node.com>
Mon, 2 Feb 2015 20:38:29 +0000 (21:38 +0100)
commite372399b4bef5d76bbeeee1ec12e8f56c257e4b6
treeacb94363e14497ef187c3478608023b8e54d8be8
parentb60e06a7f0d4319fbf95de229a6096eae024bb7f
[FEATURE] Add SplFileInfo implementation to get file mimeType

\TYPO3\CMS\Core\Type\File\FileInfo provides a new method
getMimeType() to get the MIME type of a file, e.g. text/html.

Custom implementations to determine the MIME type can be added
with the hook:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Type\File\FileInfo::class]['mimeTypeGuessers']

The FAL LocalDriver also uses this new API.

Resolves: #60019
References: #46777
Releases: master
Change-Id: Ia2fa95d2ef6452f8022e33f1b1d2a9336f3e0303
Reviewed-on: http://review.typo3.org/31256
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Steffen Müller <typo3@t3node.com>
Reviewed-by: Steffen Müller <typo3@t3node.com>
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Type/File/FileInfo.php
typo3/sysext/core/Documentation/Changelog/master/Feature-60019-SplFileInfo-MimeTypeGuesser-hook.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Resource/Driver/AbstractDriverTest.php
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
typo3/sysext/form/Classes/Request.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php