This module tries to find ways around #3027324: [PP-2] When Media entities are deleted, the associated files are not deleted. and #2821423: Dealing with unexpected file deletion due to incorrect file usage. On each update of a media item this module checks if all files of this media entity are still used in any translation or revision:

  • Files still used by an older revision are moved into private storage, because the file should not be public accessible any more.
  • If the file field of the media entity is translatable, the files of translations of the current revision should not be touched, if the translation is published.
  • If the file is not used in any revision or translation, set the file to temporary or delete it.
  • If an published media entity get unpublished, move all files to private storage.
  • If a media entity gets published, move the files of the current revision to public storage, if this is the original field definition.

In active development and not feature complete.

Project information

Releases