This module manages media files by cleaning up orphaned or unused files, moving them to private storage when a media item is unpublished or its content is no longer actively used in revisions or translations. It aims to prevent accidental file deletion and ensure proper file access permissions.
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.
Ask your assistant about Media Files Handler
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-beta1 | Pre-release | 9–10 | Apr 20, 2023 |