summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-15 17:09:08 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-15 17:09:08 +0100
commitd38b71f20602268856c7cd2ce5c773ed4f41d64b (patch)
treed1a47f3e9c4e103585975c837a462a4602b14a46 /apps/files_external
parent46b39c3465e2db9ba26b23d8d0dfca6cc670aaea (diff)
downloadnextcloud-server-d38b71f20602268856c7cd2ce5c773ed4f41d64b.tar.gz
nextcloud-server-d38b71f20602268856c7cd2ce5c773ed4f41d64b.zip
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
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/google.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 8a9ffaf7d37..f496fc77574 100644
--- a/apps/files_external/lib/google.php
+++ b/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;