GrahamCampbell/Laravel-Flysystem

Add 'use_path_style_endpoint' parameter to AwsS3Connector class

vitxu83 opened this issue · 0 comments

Hello

I am using the open source object storage server Minio in one of my projects.

I tried to configure it as the Laravel documentation explains. However, I encountered a problem.

https://laravel.com/docs/8.x/homestead#configuring-minio

Laravel, by default uses the 'filesystems.php' configuration file, not 'flysystem.php' like we do, to set the population parameters.

Among the values in the filesystems file, there is a very important one used to configure the plugin: 'use_path_style_endpoint'.

However, in your implementation I can see, you are ommitting this parameter inside the 'AwsS3Connector' class, so even if I add it to the "flysystem" file, it still wouldn't get used.

Could you please add this piece of code inside the 'getAuth' function in the AwsS3Connector class to include the "use_path_style_endpoint" variable?

        if (array_key_exists('use_path_style_endpoint', $config)) {
            $auth['use_path_style_endpoint'] = $config['use_path_style_endpoint'];
        }

Perhaps there are other important parameters I'm not aware of, but for now, I've found that this one is missing and it would be great to have it included in your plugin for code maintenance's sake.

Thank you very much.