Merge pull request #17286 from nextcloud/bugfix/noid/correctly-detect-mimetype-from-uploads
Correctly detect the mimetype from uploads
This commit is contained in:
commit
f23d49266f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue