Fix GDrive mime type detection with encryption

When encryption is enabled, GDrive would think that all files are text
files. This fix falls back to the extension based detection when a
non-special mime type is returned
This commit is contained in:
Vincent Petry 2016-02-15 17:09:08 +01:00
parent 46b39c3465
commit d38b71f206
1 changed files with 2 additions and 1 deletions

View File

@ -520,7 +520,8 @@ class Google extends \OC\Files\Storage\Common {
// Download as .odp is not available // Download as .odp is not available
return 'application/pdf'; return 'application/pdf';
} else { } else {
return $mimetype; // use extension-based detection, could be an encrypted file
return parent::getMimeType($path);
} }
} else { } else {
return false; return false;