Well, the title says it all. I added UnififedFileDeleted event handler which gets called nicely when I delete files in file explorer. But when I create a block, page file folder for it, put some files into it and go and delete the block. Event isn't triggered even when I empty the trash. Is this a bug or do i handle it differently?
Just thought to try regular pages. Results are the same. Deleting the pages, with files in page file folder, doesn't trigger deleted event.
Pagefiles are not deleted when their corresponding pages are. The files could be inserted on other pages if the editor has copied the url, that's probably why.
In admin there is scheduled job that removes unused pagefiles.
Errr... Okay. I've never heard such a behavior where you delete container but not the contents. Scheduled job wont do in my case. I have rethink this from the scratch.
You can delete the pagefiles folder when a block and/or page is deleted by listening to events in ContentRepository.