event: Add event notification for object deletion in web browser. (#3226)

Fixes #3201
This commit is contained in:
Bala FA 2016-11-10 07:42:55 -08:00 committed by Harshavardhana
parent 51d1e6f75b
commit cf2fb30ac7

View File

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