Skip to content
Snippets Groups Projects
Commit 915d37f2 authored by Vincent Petry's avatar Vincent Petry
Browse files

Fallback to default mimetype detection mechanism

parent 3891cd90
Branches
No related tags found
No related merge requests found
...@@ -418,27 +418,6 @@ class AmazonS3 extends \OC\Files\Storage\Common { ...@@ -418,27 +418,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return false; 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) { public function touch($path, $mtime = null) {
$path = $this->normalizePath($path); $path = $this->normalizePath($path);
......
...@@ -294,18 +294,6 @@ class Dropbox extends \OC\Files\Storage\Common { ...@@ -294,18 +294,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) { public function free_space($path) {
try { try {
$info = $this->dropbox->getAccountInfo(); $info = $this->dropbox->getAccountInfo();
......
...@@ -361,18 +361,6 @@ class Swift extends \OC\Files\Storage\Common { ...@@ -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) { public function touch($path, $mtime = null) {
$path = $this->normalizePath($path); $path = $this->normalizePath($path);
if (is_null($mtime)) { if (is_null($mtime)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment