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 f0ace5640 fix(core): S3 multipart uploads does not set file metadata 
(#5430)
f0ace5640 is described below

commit f0ace5640c310e5dec3b3d368346442bdc1b7a1d
Author: catcatmu <[email protected]>
AuthorDate: Thu Dec 19 04:23:45 2024 -0500

    fix(core): S3 multipart uploads does not set file metadata (#5430)
    
    Fixed: S3 multipart uploads does not set file metadata
    
    Co-authored-by: catcatmu <[email protected]>
---
 core/src/services/s3/core.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/core/src/services/s3/core.rs b/core/src/services/s3/core.rs
index 19bdbfdf7..2f9a359c7 100644
--- a/core/src/services/s3/core.rs
+++ b/core/src/services/s3/core.rs
@@ -666,6 +666,13 @@ impl S3Core {
             req = 
req.header(HeaderName::from_static(constants::X_AMZ_STORAGE_CLASS), v);
         }
 
+        // Set user metadata headers.
+        if let Some(user_metadata) = args.user_metadata() {
+            for (key, value) in user_metadata {
+                req = req.header(format!("{X_AMZ_META_PREFIX}{key}"), value)
+            }
+        }
+
         // Set SSE headers.
         let req = self.insert_sse_headers(req, true);
 

Reply via email to