Skip to content

Commit

Permalink
center: generate correct s3 download link
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxiaohei committed Aug 24, 2023
1 parent e13eadd commit b83368f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion binary/center/src/region/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ async fn build_conf() -> Result<()> {
match typename.as_str() {
"s3" => {
format!(
"{}/{}",
"{}/{}/{}",
s3_config.bucket_basepath.trim_end_matches('/'),
s3_config.root_path.trim_start_matches('/'),
path
)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/src/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct Config {
#[envconfig(from = "S3_SECRET_ACCESS_KEY")]
secret_access_key: String,
#[envconfig(from = "S3_ROOT_PATH", default = "/wasm-bin")]
root_path: String,
pub root_path: String,
#[envconfig(from = "S3_BUCKET_BASEPATH")]
pub bucket_basepath: String,
}
Expand Down

0 comments on commit b83368f

Please sign in to comment.