diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-03-15 08:34:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-15 08:34:58 +0100 |
commit | fde08a961941323b445f5b5eed10cf25199fb5b4 (patch) | |
tree | 9e7ca7f98098401b1609a7f434b7dbee3f9ea191 /lib | |
parent | f2b93f5246a4e7391634b9bd50737a06379e72fe (diff) | |
parent | d3e7996e808fa50071cd0b5397bd5b21fb9f2d2f (diff) | |
download | nextcloud-server-fde08a961941323b445f5b5eed10cf25199fb5b4.tar.gz nextcloud-server-fde08a961941323b445f5b5eed10cf25199fb5b4.zip |
Merge pull request #8793 from nextcloud/swift-config
Swift uses `containter` not `bucket`
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/ObjectStore/Swift.php | 4 | ||||
-rw-r--r-- | lib/private/Files/ObjectStore/SwiftFactory.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php index 4451fbcc750..f22e147445b 100644 --- a/lib/private/Files/ObjectStore/Swift.php +++ b/lib/private/Files/ObjectStore/Swift.php @@ -62,6 +62,10 @@ class Swift implements IObjectStore { * @return string the container name where objects are stored */ public function getStorageId() { + if (isset($this->params['bucket'])) { + return $this->params['bucket']; + } + return $this->params['container']; } diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index eab3441ff2c..7bb76782a82 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -77,7 +77,7 @@ class SwiftFactory { $this->params['container'] = $this->params['bucket']; } if (!isset($this->params['container'])) { - $this->params['container'] = 'owncloud'; + $this->params['container'] = 'nextcloud'; } if (!isset($this->params['autocreate'])) { // should only be true for tests @@ -95,7 +95,7 @@ class SwiftFactory { $this->params['tenantName'] = $this->params['tenant']; } - $cacheKey = $userName . '@' . $this->params['url'] . '/' . $this->params['bucket']; + $cacheKey = $userName . '@' . $this->params['url'] . '/' . $this->params['container']; $token = $this->getCachedToken($cacheKey); $hasToken = is_array($token) && (new \DateTimeImmutable($token['expires_at'])) > (new \DateTimeImmutable('now')); if ($hasToken) { |