mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-19 02:56:18 +00:00
fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user