Merge pull request #15715 from nextcloud/s3-bucket-name

Allow other code to use the s3 client from object store
This commit is contained in:
Morris Jobke 2019-05-24 15:03:22 +02:00 committed by GitHub
commit 96e892770d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,6 +65,9 @@ trait S3ConnectionTrait {
$this->params = $params; $this->params = $params;
} }
public function getBucket() {
return $this->bucket;
}
/** /**
* Returns the connection * Returns the connection
@ -72,7 +75,7 @@ trait S3ConnectionTrait {
* @return S3Client connected client * @return S3Client connected client
* @throws \Exception if connection could not be made * @throws \Exception if connection could not be made
*/ */
protected function getConnection() { public function getConnection() {
if (!is_null($this->connection)) { if (!is_null($this->connection)) {
return $this->connection; return $this->connection;
} }