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

Fixes #3201
master
Bala FA 8 years ago committed by Harshavardhana
parent 51d1e6f75b
commit cf2fb30ac7
  1. 13
      cmd/web-handlers.go

@ -273,6 +273,19 @@ func (web *webAPIHandlers) RemoveObject(r *http.Request, args *RemoveObjectArgs,
if err := objectAPI.DeleteObject(args.BucketName, args.ObjectName); err != nil { if err := objectAPI.DeleteObject(args.BucketName, args.ObjectName); err != nil {
return &json2.Error{Message: err.Error()} 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 reply.UIVersion = miniobrowser.UIVersion
return nil return nil
} }

Loading…
Cancel
Save