Send events for extracted objects (#17760)

Fixes #17759
This commit is contained in:
Klaus Post 2023-07-31 08:33:51 -07:00 committed by GitHub
parent 715c9e3ca9
commit 684c46369c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}