This commit is contained in:
houseme
2025-06-23 04:15:05 +08:00
parent 928453db62
commit 5155a3d544
8 changed files with 16 additions and 20 deletions
+6 -7
View File
@@ -488,13 +488,12 @@ impl Event {
s3_metadata.object.etag = args.object.etag.clone();
s3_metadata.object.content_type = args.object.content_type.clone();
// Filter out internal reserved metadata
let user_metadata = args
.object
.user_defined
.iter()
.filter(|&(k, v)| !k.to_lowercase().starts_with("x-amz-meta-internal-"))
.map(|(k, v)| (k.clone(), v.clone()))
.collect::<HashMap<String, String>>();
let mut user_metadata = HashMap::new();
for (k, v) in &args.object.user_defined.unwrap_or_default() {
if !k.to_lowercase().starts_with("x-amz-meta-internal-") {
user_metadata.insert(k.clone(), v.clone());
}
}
s3_metadata.object.user_metadata = Some(user_metadata);
}
+1 -1
View File
@@ -32,7 +32,7 @@ pub struct Notifier {
// Rely on getting an instance of NotificationSystem from the outside.
}
impl crate::notifier::Notifier {
impl Notifier {
/// Notify an event asynchronously.
/// This is the only entry point for all event notifications in the system.
pub async fn notify(&self, args: EventArgs) {