All 3 platforms will not require an additional region field and the current PR will add support for DigitalOcean Spaces and Minio.
-
Minio: endpoint format: server_ip:9000 or user domain
Requiresregionbut it works perfectly with the pre-existings3_regionoptions (drop-down menu) in site settings so it does not need an extraregionfield. -
Google Cloud Platform: endpoint format: https://storage.googleapis.com
Does not require aregionparameter but I haven’t got it to work yet because of an incorrect header issue that I’m investigating but it will work without an extraregionfield once I debug the issue. -
DigitalOcean Spaces: endpoint format: https://nyc3.digitaloceanspaces.com
Works perfectly without an extraregionfield.
@Falco Before we ship it, the last problem is that Minio requires { force_path_style: true } in s3_options and AWS requires the setting to be false. This is because AWS and Minio use different addressing styles so if we force one, it breaks the other.
I know we wanted to avoid this but I don’t see how we can make both work without adding something specific like this:
if opts[:endpoint].includes? "minio"
opts[:force_path_style] = true
But even this won’t work because a lot of Minio users might use IP addresses to their servers instead of having “minio” in their endpoint. We have to think of a way to detect a Minio endpoint and we might need Minio specific code in Discourse if we want to support it.
We could support a lot of cloud options easily if we could have a free-text field for entering key:pair options for greater flexibility and avoiding issues like this. The region and force_path_style issues would be solved. @riking What do you feel about a field like this?