prabirshrestha opened a new issue, #3019:
URL: https://github.com/apache/incubator-opendal/issues/3019
Currently if you don't pass the bucket it fails with error.
```rust
let mut builder = opendal::services::S3::default();
builder
.endpoint("https://s3.home.prabir.me")
.root("/")
.access_key_id("..")
.secret_access_key("..");
let op = Operator::new(builder).unwrap().finish();
let result = op.stat("/").await.unwrap();
dbg!(&result);
```
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
ConfigInvalid (permanent) at => The bucket is misconfigured
Context:
service: s3
', src/main.rs:19:37
```
I think bucket should be optional. This means calling `/` would list buckets
and `/bucket-name` would list of items inside the bucket and so on.
If it is not optional I need to have a logic on my side to parse the path
and set the bucket which tends to be a bit more work on my side.
Similar to `builder.allow_anonymous()` would be good to have
`builder.allow_bucket_in_path()` method to opt in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]