You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2025/08/24 13:47:47 UTC
Re: [PR] feat(services/s3): add S3 tagging write support [opendal]
tisonkun commented on code in PR #6532:
URL: https://github.com/apache/opendal/pull/6532#discussion_r2296667847
##########
core/src/services/s3/core.rs:
##########
@@ -343,6 +344,31 @@ impl S3Core {
req = req.header(format!("{X_AMZ_META_PREFIX}{key}"), value)
}
}
+
+ // Set object tagging headers if tagging is enabled and tags are provided.
+ if !self.disable_tagging {
+ if let Some(tags) = args.tags() {
+ if !tags.is_empty() {
+ let tags_string = tags
+ .iter()
+ .map(|(k, v)| {
+ format!(
+ "{}={}",
+ k.replace('&', "%26")
+ .replace('=', "%3D")
+ .replace('+', "%2B"),
+ v.replace('&', "%26")
+ .replace('=', "%3D")
+ .replace('+', "%2B")
Review Comment:
Could you provide the source of this logic? I suppose that S3's docs or other materials define it.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org