edwardspec / mediawiki-aws-s3

Extension:AWS allows MediaWiki to use Amazon S3 (instead of the local directory) to store images.
https://www.mediawiki.org/wiki/Extension:AWS
GNU General Public License v2.0
42 stars 32 forks source link

Add $wgFileBackends['s3']['use_path_style_endpoint'] pls. #33

Closed cheerfulsolar closed 4 years ago

cheerfulsolar commented 4 years ago

Hello! I have a private S3 with an endpoint URL like https://example.com/bucket-name/ The AWS library supports this type of path with the parameter 'use_path_style_endpoint'.

Add it to the $wgFileBackends['s3'] array, please.

Thanks so much for your work!

edwardspec commented 4 years ago

Path-style S3 endpoints are deprecated (see https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/ ), and in October 2020 they will stop working for newly created S3 buckets. So there is no point to add support for them.

For your own wiki you can just add the line 'use_path_style_endpoint' => true, to the file s3/AmazonS3FileBackend.php after the line $params = [