Skip to content

Commit

Permalink
improve bucket handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKaul committed Jan 25, 2024
1 parent beedba7 commit a9a75be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dashtool/src/plugins/sql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ impl SqlPlugin {
let object_store: Arc<dyn ObjectStore> = match &config.object_store {
ObjectStoreConfig::Memory => Arc::new(InMemory::new()),
ObjectStoreConfig::S3(s3_config) => {
full_bucket_name = "s3://".to_owned() + config.bucket.trim_start_matches("s3://");
let bucket_name = config.bucket.trim_start_matches("s3://");
full_bucket_name = "s3://".to_owned() + bucket_name;

let mut builder = AmazonS3Builder::from_env()
.with_region(&s3_config.aws_region)
.with_bucket_name(config.bucket.clone())
.with_bucket_name(bucket_name)
.with_access_key_id(&s3_config.aws_access_key_id);

if let Some(endpoint) = &s3_config.aws_endpoint {
Expand Down

0 comments on commit a9a75be

Please sign in to comment.