Merge pull request #21139 from owncloud/makeswifturltypeconfigurable
make url type configurable
This commit is contained in:
commit
71999ef820
|
@ -958,6 +958,8 @@ $CONFIG = array(
|
||||||
// dev-/trystack uses swift by default, the lib defaults to 'cloudFiles'
|
// dev-/trystack uses swift by default, the lib defaults to 'cloudFiles'
|
||||||
// if omitted
|
// if omitted
|
||||||
'serviceName' => 'swift',
|
'serviceName' => 'swift',
|
||||||
|
// The Interface / url Type, optional
|
||||||
|
'urlType' => 'internal'
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
@ -73,11 +73,16 @@ class Swift implements IObjectStore {
|
||||||
|
|
||||||
// the OpenCloud client library will default to 'cloudFiles' if $serviceName is null
|
// the OpenCloud client library will default to 'cloudFiles' if $serviceName is null
|
||||||
$serviceName = null;
|
$serviceName = null;
|
||||||
if ($this->params['serviceName']) {
|
if (isset($this->params['serviceName'])) {
|
||||||
$serviceName = $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 {
|
try {
|
||||||
$this->container = $this->objectStoreService->getContainer($this->params['container']);
|
$this->container = $this->objectStoreService->getContainer($this->params['container']);
|
||||||
|
|
Loading…
Reference in New Issue