Skip to content

v0.4.0

Choose a tag to compare

@cbeckermuc cbeckermuc released this 10 Sep 10:32
· 15 commits to main since this release

Media files can now be protected from deletion

  • New MediaUsageRegistry singleton: any module registers a check from its service provider's boot() and returns a human-readable reason when a file must not be deleted. The media module stays free of knowledge about who uses its files.
  • The guard sits on the Media model (deleting event) and throws MediaInUseException, so every deletion path is covered — library screen, bulk delete, commands, tinker.
  • The media library deletes the ROW first and the FILE second, and shows the reason instead of refusing silently. Previously a refused deletion could leave a record pointing at a file that was already gone.
  • A bulk delete removes the free files and keeps the claimed ones selected; a check that throws is reported and falls through instead of making the file undeletable.