mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue