Unreferenced files shall be deleted from storages upon deletion

The physical files in the storages, either Local Storage or S3 Pro, referenced via Attachment field interface type or File Collection, shall be deleted when users click on Delete button.
image

And prompt the users for the confirmation that the files will be deleted permanently.

Advantages:

  1. To prevent orphan physical files remain in storages.
  2. To prevent unreferenced File Collection records.
  3. No scheduled clean up job required.