diff options
author | Dzmitry Zaitsau <pradd.me@gmail.com> | 2019-02-21T13·26+0100 |
---|---|---|
committer | Dzmitry Zaitsau <pradd.me@gmail.com> | 2019-02-25T17·06+0100 |
commit | ac200c3678c0f569cd962d8bbd22bb74b223d748 (patch) | |
tree | b34c7d632ee1e09394a26f7c5c7da6345c491663 /src | |
parent | 56c18c67d98078dbed1d05ac68663cc52d2cb543 (diff) |
Apply param values on S3Helper initialization
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/download.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 8bc496515f78..f1666d293ea4 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -639,7 +639,14 @@ struct CurlDownloader : public Downloader try { #ifdef ENABLE_S3 auto [bucketName, key, params] = parseS3Uri(request.uri); - S3Helper s3Helper("", Aws::Region::US_EAST_1, "", ""); // FIXME: make configurable + + std::string profile = get(params, "profile", ""); + std::string region = get(params, "region", Aws::Region::US_EAST_1); + std::string scheme = get(params, "scheme", ""); + std::string endpoint = get(params, "endpoint", ""); + + S3Helper s3Helper(profile, region, scheme, endpoint); + // FIXME: implement ETag auto s3Res = s3Helper.getObject(bucketName, key); DownloadResult res; |