diff options
Diffstat (limited to 'apps/files_external/lib/swift.php')
-rw-r--r-- | apps/files_external/lib/swift.php | 3 |
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); |