Commit
+3 -1 +/-1 browse
1 | diff --git a/src/storage/s3.rs b/src/storage/s3.rs |
2 | index 38ff3a0..e0f6fb8 100644 |
3 | --- a/src/storage/s3.rs |
4 | +++ b/src/storage/s3.rs |
5 | @@ -95,15 +95,17 @@ impl Backend { |
6 | while prefix.ends_with('/') { |
7 | prefix.pop(); |
8 | } |
9 | + |
10 | // `Region::default` will get try to get the region from the environment |
11 | // and fallback to a default if it isn't found. |
12 | let mut region = Region::default(); |
13 | if let Ok(endpoint) = std::env::var("AWS_S3_ENDPOINT") { |
14 | region = Region::Custom { |
15 | name: region.name().to_owned(), |
16 | - endpoint: endpoint, |
17 | + endpoint, |
18 | } |
19 | } |
20 | + |
21 | Backend::with_client(S3Client::new(region), bucket, prefix) |
22 | } |
23 | } |