File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ Map<String, ObjectStore> createStoresFromConfig(
104104 : siaConfig['busApiUrl' ],
105105 apiPassword: siaConfig['apiPassword' ]! ,
106106 downloadUrls: [siaConfig['downloadUrl' ]! ],
107+ bucket: siaConfig['bucket' ] ?? 'default' ,
107108 httpClient: httpClient,
108109 );
109110 }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class SiaObjectStore extends ObjectStore {
1414 final String busApiUrl;
1515 final String workerApiUrl;
1616 final String apiPassword;
17+ final String bucket;
1718 final Client httpClient;
1819
1920 final List <String > downloadUrls;
@@ -24,7 +25,9 @@ class SiaObjectStore extends ObjectStore {
2425 final availableBaoOutboardHashes = < Multihash > {};
2526
2627 Uri _getApiUri (String path) {
27- return Uri .parse ('$workerApiUrl $path ' );
28+ return Uri .parse ('$workerApiUrl $path ' ).replace (queryParameters: {
29+ 'bucket' : bucket,
30+ });
2831 }
2932
3033 @override
@@ -62,6 +65,7 @@ class SiaObjectStore extends ObjectStore {
6265 required this .apiPassword,
6366 required this .httpClient,
6467 required this .downloadUrls,
68+ required this .bucket,
6569 }) {
6670 _headers = {
6771 'Authorization' : 'Basic ${base64Url .encode (utf8 .encode (':$apiPassword ' ))}'
You can’t perform that action at this time.
0 commit comments