Merge pull request #17286 from nextcloud/bugfix/noid/correctly-detect-mimetype-from-uploads

Correctly detect the mimetype from uploads
This commit is contained in:
Joas Schilling 2019-09-27 10:51:10 +02:00 committed by GitHub
commit f23d49266f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
$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) {