This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new aec504753 feat: propagate disable_list_objects_v2 to S3Builder (#6055)
aec504753 is described below

commit aec5047533a3fd208f5a1932caa5ff6f5655227b
Author: tison <[email protected]>
AuthorDate: Sat Apr 19 23:29:34 2025 +0800

    feat: propagate disable_list_objects_v2 to S3Builder (#6055)
---
 core/src/services/s3/backend.rs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/core/src/services/s3/backend.rs b/core/src/services/s3/backend.rs
index 0a46ebf03..ba19c14c9 100644
--- a/core/src/services/s3/backend.rs
+++ b/core/src/services/s3/backend.rs
@@ -410,6 +410,16 @@ impl S3Builder {
         self
     }
 
+    /// Disable list objects v2 so that opendal will not use the older
+    /// List Objects V1 to list objects.
+    ///
+    /// By default, OpenDAL uses List Objects V2 to list objects. However,
+    /// some legacy services do not yet support V2.
+    pub fn disable_list_objects_v2(mut self) -> Self {
+        self.config.disable_list_objects_v2 = true;
+        self
+    }
+
     /// Disable load credential from ec2 metadata.
     ///
     /// This option is used to disable the default behavior of opendal

Reply via email to