diff --git a/crates/core/config/Revolt.toml b/crates/core/config/Revolt.toml index f25e7e3d..359c0e99 100644 --- a/crates/core/config/Revolt.toml +++ b/crates/core/config/Revolt.toml @@ -132,6 +132,7 @@ emojis = [128, 128] # # Backblaze B2: # - endpoint is listed on the "Buckets" page +# - path_style_buckets is set to true # - region is `eu-central-003` string from endpoint URL # - access_key_id is keyID generated on the "Application Keys" page # - secret_access_key is token generated on the "Application Keys" page @@ -139,6 +140,9 @@ emojis = [128, 128] # S3 protocol endpoint endpoint = "http://minio:9000" +# Whether to use path-style buckets +# Generally true, except for MinIO +path_style_buckets = false # S3 region name region = "minio" # S3 protocol key ID diff --git a/crates/core/config/src/lib.rs b/crates/core/config/src/lib.rs index 9f627bd2..e0f57d17 100644 --- a/crates/core/config/src/lib.rs +++ b/crates/core/config/src/lib.rs @@ -175,6 +175,7 @@ pub struct FilesLimit { #[derive(Deserialize, Debug, Clone)] pub struct FilesS3 { pub endpoint: String, + pub path_style_buckets: bool, pub region: String, pub access_key_id: String, pub secret_access_key: String, diff --git a/crates/core/files/src/lib.rs b/crates/core/files/src/lib.rs index d4e2b2ab..c09853dd 100644 --- a/crates/core/files/src/lib.rs +++ b/crates/core/files/src/lib.rs @@ -34,6 +34,7 @@ pub fn create_client(s3_config: FilesS3) -> Client { let config = Config::builder() .region(Region::new(s3_config.region)) .endpoint_url(s3_config.endpoint) + .force_path_style(s3_config.path_style_buckets) .credentials_provider(creds) .build();