Use a more widely available method to test s3 settings
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
655e39ffcd
commit
3036fb95ae
|
@ -572,13 +572,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 New Issue