Correctly detect the mimetype from uploads
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
c1018bbbe4
commit
ec1ff53a64
|
@ -113,7 +113,7 @@ class FileMimeType extends AbstractStringCheck {
|
|||
$files = $this->request->getUploadedFile('files');
|
||||
if (isset($files['type'][0])) {
|
||||
$mimeType = $files['type'][0];
|
||||
if ($this->mimeType === 'application/octet-stream') {
|
||||
if ($mimeType === 'application/octet-stream') {
|
||||
// Maybe not...
|
||||
$mimeTypeTest = $this->mimeTypeDetector->detectPath($files['name'][0]);
|
||||
if ($mimeTypeTest !== 'application/octet-stream' && $mimeTypeTest !== false) {
|
||||
|
|
Loading…
Reference in New Issue