Merge pull request #19758 from owncloud/ext-fallback-getmimetype

Fallback to default mimetype detection mechanism
This commit is contained in:
Thomas Müller 2015-10-28 14:50:19 +01:00
commit 92e63a802c
3 changed files with 0 additions and 45 deletions

View file

@ -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);

View file

@ -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();

View file

@ -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)) {