beforeUpdate does not fire when object is in relation with parent

I have relation Parent with Child
Parent parent = new Parent();
parent.setChild(new Child());
So when i save them
parent.save();
beforeUpdate handler of Child does not fire on serverside. In Parent class this handler works as expected.
In Child class i see only beforeFind and beforeRemove handlers.

That’s correct, event handlers are not called for “child” objects.

So maybe you help me resolve my issue with another way:
I have a parent class and child. Child contains field pointed to uploaded photo. So when i change photo of child i need delete the previous one (old). As i understand i can delete outdated file only from client side after successful uploading new one ?! But this is excess request. The best way to handle it on server side

Even if you do it on the server-side, it is still an API call. As an alternative, you could create a custom event which contains the logic and trigger that event from the client when the photo needs to be updated.