Summary of Everything We've Implemented

All the requested features have been successfully implemented:

1. Physical File Deletion on Document Delete

  • Files are automatically deleted when documents are deleted
  • Also cleans up version history, downloads, and favorites

2. Complete Cleanup on Module Uninstall

  • All documents, physical files, and directories are removed on uninstall
  • Deletes files from public://, private://, and oci:// storage

3. Folder Name Tokens for File Directory

  • Created custom tokens: [entity:document:folder-path], [entity:document:folder-name], [entity:document:folder-slug], [entity:document:folder-id]
  • Default file directory: documents/[entity:document:folder-path]/[date:custom:Y]-[date:custom:m]

Other Fixes During This Session:

  • Fixed file size display issue
  • Fixed breadcrumbs (removed document title from breadcrumb, kept folder path only)
  • Restored document title in main header

You can now:

  • Delete documents and their files will be automatically removed
  • Uninstall the module and all files/data will be cleaned up
  • Upload files organized by folder structure (e.g., documents/finance-sector-processes/general-ledger/2025-12/file.pdf)
  • Edit the file directory at /admin/structure/document/fields/document.document.field_file using the custom tokens
VCS Label
1.1.0
Release type
Packaged Git sha1
c4a06c3c943c58ed62e0f6b916468e755b3dbd2a
Release files