Use a more widely available method to test s3 settings
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
b939383049
commit
48ea714341
|
@ -566,14 +566,11 @@ 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'))) {
|
||||
$this->getConnection()->headBucket([
|
||||
'Bucket' => $this->bucket
|
||||
]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getId() {
|
||||
return $this->id;
|
||||
|
|
Loading…
Reference in New Issue