diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-08 12:34:58 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-08 12:34:58 +0100 |
commit | 71999ef8206ca8d9eab024f1325e15c45984367d (patch) | |
tree | ae8c07e1358e60bdd891caa3f87fcdb60f739a9a | |
parent | 70b58cf367d521696ad0094561fa6c3a2418afb7 (diff) | |
parent | 3f101039b9621837f9405f1b58357d82a712a3a0 (diff) | |
download | nextcloud-server-71999ef8206ca8d9eab024f1325e15c45984367d.tar.gz nextcloud-server-71999ef8206ca8d9eab024f1325e15c45984367d.zip |
Merge pull request #21139 from owncloud/makeswifturltypeconfigurable
make url type configurable
-rw-r--r-- | config/config.sample.php | 2 | ||||
-rw-r--r-- | lib/private/files/objectstore/swift.php | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 3208a255144..7ba3977fe3a 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -958,6 +958,8 @@ $CONFIG = array( // dev-/trystack uses swift by default, the lib defaults to 'cloudFiles' // if omitted 'serviceName' => 'swift', + // The Interface / url Type, optional + 'urlType' => 'internal' ), ), diff --git a/lib/private/files/objectstore/swift.php b/lib/private/files/objectstore/swift.php index 89ef40360a7..50bb0d9adf5 100644 --- a/lib/private/files/objectstore/swift.php +++ b/lib/private/files/objectstore/swift.php @@ -73,11 +73,16 @@ class Swift implements IObjectStore { // the OpenCloud client library will default to 'cloudFiles' if $serviceName is null $serviceName = null; - if ($this->params['serviceName']) { + if (isset($this->params['serviceName'])) { $serviceName = $this->params['serviceName']; } - $this->objectStoreService = $this->client->objectStoreService($serviceName, $this->params['region']); + // the OpenCloud client library will default to 'publicURL' if $urlType is null + $urlType = null; + if (isset($this->params['urlType'])) { + $urlType = $this->params['urlType']; + } + $this->objectStoreService = $this->client->objectStoreService($serviceName, $this->params['region'], $urlType); try { $this->container = $this->objectStoreService->getContainer($this->params['container']); |