Problem/Motivation
File usage is not being counted by drupal core (at this time) 8.8.12 release and 8.9.10 and 9.0.x for wysiwyg embedded images
So safedelete would like to help.
Steps to reproduce
embed a media item using the wysiwyg editor and the media browser entity embed
save the node
check the file_usage
no change
Proposed resolution
embed a media item using the wysiwyg editor and the media browser entity embed
save the node
check the file_usage
adding media will now increment
removing media or deleting node will decrement file usage for media with file
Remaining tasks
review commit
Comments
Comment #3
jamesyao commentedAdded the custom file usage handler to manage the file usage when the user inserts the file through Media library.
data-entity-type="media" data-entity-uuid="([a-z]|[0-9]){8}-(([0-9]|[a-z]){4}-){3}([0-9]|[a-z]){12}";
Comment #5
joseph.olstadThanks jamesYa0, great work!