aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/swift.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-10-21 12:58:26 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-10-21 12:58:26 +0200
commit1c9004409b70461b61d9e6491584f1de6399a2be (patch)
treee33498ee63a7dc4c1400dbd867516d8b09529b99 /apps/files_external/lib/swift.php
parent3e499d1ac4fb18ee24c7a7aa032619a21e08a97f (diff)
downloadnextcloud-server-1c9004409b70461b61d9e6491584f1de6399a2be.tar.gz
nextcloud-server-1c9004409b70461b61d9e6491584f1de6399a2be.zip
guess mimetype on touch
Diffstat (limited to 'apps/files_external/lib/swift.php')
-rw-r--r--apps/files_external/lib/swift.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index 6a1e12986fb..22a18202512 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -406,7 +406,8 @@ class Swift extends \OC\Files\Storage\Common {
$object->saveMetadata($metadata);
return true;
} else {
- $customHeaders = array('content-type' => 'text/plain');
+ $mimeType = \OC_Helper::getMimetypeDetector()->detectPath($path);
+ $customHeaders = array('content-type' => $mimeType);
$metadataHeaders = DataObject::stockHeaders($metadata);
$allHeaders = $customHeaders + $metadataHeaders;
$this->container->uploadObject($path, '', $allHeaders);