mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #8158 from nextcloud/s3-minio
Use a more widely available method to test s3 settings
This commit is contained in:
commit
7ad1e13961
1 changed files with 4 additions and 7 deletions
|
|
@ -571,13 +571,10 @@ class AmazonS3 extends \OC\Files\Storage\Common {
|
|||
}
|
||||
|
||||
public function test() {
|
||||
$test = $this->getConnection()->getBucketAcl(array(
|
||||
'Bucket' => $this->bucket,
|
||||
));
|
||||
if (isset($test) && !is_null($test->getPath('Owner/ID'))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
$this->getConnection()->headBucket([
|
||||
'Bucket' => $this->bucket
|
||||
]);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getId() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue