Merge pull request #8158 from nextcloud/s3-minio

Use a more widely available method to test s3 settings
This commit is contained in:
Roeland Jago Douma 2018-02-19 17:09:36 +01:00 committed by GitHub
commit 7ad1e13961
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {