summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-28 14:50:19 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-28 14:50:19 +0100
commit92e63a802c9324ccfcd716bb0461f5b7cc153549 (patch)
treebe411210502ab89e9e71926d727be2d404e6b959 /apps
parent8ad3df9b9eb064a787c5b6aaf7d1d08458c1fba8 (diff)
parent915d37f226e107c86a04ad6a8b985440c6dee34a (diff)
downloadnextcloud-server-92e63a802c9324ccfcd716bb0461f5b7cc153549.tar.gz
nextcloud-server-92e63a802c9324ccfcd716bb0461f5b7cc153549.zip
Merge pull request #19758 from owncloud/ext-fallback-getmimetype
Fallback to default mimetype detection mechanism
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/amazons3.php21
-rw-r--r--apps/files_external/lib/dropbox.php12
-rw-r--r--apps/files_external/lib/swift.php12
3 files changed, 0 insertions, 45 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 00915140bab..4b867c005a7 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -418,27 +418,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return false;
}
- public function getMimeType($path) {
- $path = $this->normalizePath($path);
-
- if ($this->is_dir($path)) {
- return 'httpd/unix-directory';
- } else if ($this->file_exists($path)) {
- try {
- $result = $this->getConnection()->headObject(array(
- 'Bucket' => $this->bucket,
- 'Key' => $path
- ));
- } catch (S3Exception $e) {
- \OCP\Util::logException('files_external', $e);
- return false;
- }
-
- return $result['ContentType'];
- }
- return false;
- }
-
public function touch($path, $mtime = null) {
$path = $this->normalizePath($path);
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
index 3b353b7777a..df8a0255134 100644
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
@@ -299,18 +299,6 @@ class Dropbox extends \OC\Files\Storage\Common {
}
}
- public function getMimeType($path) {
- if ($this->filetype($path) == 'dir') {
- return 'httpd/unix-directory';
- } else {
- $metaData = $this->getDropBoxMetaData($path);
- if ($metaData) {
- return $metaData['mime_type'];
- }
- }
- return false;
- }
-
public function free_space($path) {
try {
$info = $this->dropbox->getAccountInfo();
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index b9454b8d671..beb47ce0bce 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -361,18 +361,6 @@ class Swift extends \OC\Files\Storage\Common {
}
}
- public function getMimeType($path) {
- $path = $this->normalizePath($path);
-
- if ($this->is_dir($path)) {
- return 'httpd/unix-directory';
- } else if ($this->file_exists($path)) {
- $object = $this->getContainer()->getPartialObject($path);
- return $object->getContentType();
- }
- return false;
- }
-
public function touch($path, $mtime = null) {
$path = $this->normalizePath($path);
if (is_null($mtime)) {