mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
event: Add event notification for object deletion in web browser. (#3226)
Fixes #3201
This commit is contained in:
parent
51d1e6f75b
commit
cf2fb30ac7
@ -273,6 +273,19 @@ func (web *webAPIHandlers) RemoveObject(r *http.Request, args *RemoveObjectArgs,
|
||||
if err := objectAPI.DeleteObject(args.BucketName, args.ObjectName); err != nil {
|
||||
return &json2.Error{Message: err.Error()}
|
||||
}
|
||||
|
||||
// Notify object deleted event.
|
||||
eventNotify(eventData{
|
||||
Type: ObjectRemovedDelete,
|
||||
Bucket: args.BucketName,
|
||||
ObjInfo: ObjectInfo{
|
||||
Name: args.ObjectName,
|
||||
},
|
||||
ReqParams: map[string]string{
|
||||
"sourceIPAddress": r.RemoteAddr,
|
||||
},
|
||||
})
|
||||
|
||||
reply.UIVersion = miniobrowser.UIVersion
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user