Girder Plugin

Hi,

So far we have successful with girder,
We developed our own plugin to add some features to our server .
So the logic is every time a file is uploaded or deleted our plugin should be triggered ,
we successfully did the first part as we upload a new file our plugin is triggered
but when we tried to delete a file our plugin is triggered before the data is deleted.

Is there an event like model.item.delete.after (same model as save “model.item.save.after”)

Any leads would be a great help for our team

Thanks and Regards ,
Vicky

There isn’t a model.<model>.remove.after event. As you have in your code, if you are using the REST endpoints, you can use the rest.delete.file/:id.after event.

It wouldn’t be that hard to add a model.<model>.remove.after event in Girder core – it should just be adding a trigger before girder/model_base.py at master · girder/girder · GitHub returns.

Alternately, your plugin could patch the Model class, wrapping the existing remove method such that it would emit the event.

– David