vaersaagod / dospaces

DigitalOcean Spaces integration for Craft CMS
MIT License
35 stars 8 forks source link

Can bucket_endpoint be set in the a config? #26

Open green17 opened 2 years ago

green17 commented 2 years ago

Not a digital ocean problem but we were trying to test with MINIO S3 (https://min.io/) on our setup it seems to not like adding the bucket name as a subdomain, from looking at other issues (https://github.com/vaersaagod/dospaces/issues/16) I saw that you can add the below to the plugin and this fixes the problem for us but can this be set via a config?

$config['bucket_endpoint'] = true;

In Volume.php:

protected function createAdapter()
{
    $config = $this->_getConfigArray();
    $config['bucket_endpoint'] = true;
    $client = static::client($config);
    return new AwsS3Adapter($client, $this->getBucket(), $this->getSubfolder());
}