Browse Source

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
remotes/origin/users-ajaxloadgroups
Vincent Petry 10 years ago
parent
commit
d38b71f206
  1. 3
      apps/files_external/lib/google.php

3
apps/files_external/lib/google.php

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

Loading…
Cancel
Save