Improve MIME detection in FileBackend
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 14 Nov 2014 06:47:06 +0000 (22:47 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 2 Nov 2015 00:36:54 +0000 (00:36 +0000)
commitde290cd02db7150549da5cc66c9af3de6933a68b
tree1495248fb0de678116ccaca5f4dd6f95daf7d4ee
parent8f15bc8ec9e15bca8c19490ccaa45f805d54a035
Improve MIME detection in FileBackend

The content type detector will now inspect the file contents
to better handle extensionless files.

Also dependency inject the callback and make the default one
use FileInfo.

Change-Id: Iad59bf6c6a416b706f976a4c425763fd30e2debb
includes/filebackend/FileBackendGroup.php
includes/filebackend/FileBackendStore.php
tests/phpunit/includes/filebackend/FileBackendTest.php