forked from TrueCloudLab/frostfs-s3-gw
[#357] Add ObjectCreated notifications
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
67c1ba2c61
commit
b7aac223df
3 changed files with 40 additions and 0 deletions
|
@ -426,6 +426,16 @@ func (h *handler) CompleteMultipartUploadHandler(w http.ResponseWriter, r *http.
|
|||
}
|
||||
}
|
||||
|
||||
s := &layer.SendNotificationParams{
|
||||
Event: layer.EventObjectCreatedCompleteMultipartUpload,
|
||||
ObjInfo: objInfo,
|
||||
BktInfo: bktInfo,
|
||||
ReqInfo: reqInfo,
|
||||
}
|
||||
if err := h.obj.SendNotifications(r.Context(), s); err != nil {
|
||||
h.log.Error("couldn't send notification: %w", zap.Error(err))
|
||||
}
|
||||
|
||||
if _, err = h.obj.DeleteObjects(r.Context(), bktInfo, []*layer.VersionedObject{{Name: initPart.Name}}); err != nil {
|
||||
h.logAndSendError(w, "could not delete init file of multipart upload", reqInfo, err, additional...)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue