From 684c46369c7baa63ef4010dc0bd670e322a1fd85 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Mon, 31 Jul 2023 08:33:51 -0700 Subject: [PATCH] Send events for extracted objects (#17760) Fixes #17759 --- cmd/object-handlers.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index 76234d89c..4d43afadd 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -2243,6 +2243,19 @@ func (api objectAPIHandlers) PutObjectExtractHandler(w http.ResponseWriter, r *h }, replication.ObjectReplicationType, opts)); dsc.ReplicateAny() { scheduleReplication(ctx, objInfo.Clone(), objectAPI, dsc, replication.ObjectReplicationType) } + + // Notify object created event. + evt := eventArgs{ + EventName: event.ObjectCreatedPut, + BucketName: bucket, + Object: objInfo, + ReqParams: extractReqParams(r), + RespElements: extractRespElements(w), + UserAgent: r.UserAgent(), + Host: handlers.GetSourceIP(r), + } + sendEvent(evt) + return nil }