Accessible File Manager
No security coverage
Accessible File Manager (accessible_file_manager)
An accessibility-first, enterprise-grade file management, security, and analytics ecosystem for Drupal.
The Accessible File Manager module bridges the gap between physical server files and Drupal's database records. It introduces a powerful, accessible File Explorer that lets administrators browse public:// and private:// file directories directly—acting just like an embedded FTP/SFTP client—while maintaining deep integration with Drupal's File entities (FID) via dynamic Views tables, usage analytics, and automated naming rules.
Key Features
📁 FTP-like Accessible File Explorer (WAI-ARIA Compliant)
- Direct Directory Navigation (FTP-like Experience): Allows real-time visual browsing and navigation of physical
public://andprivate://file systems directly from the browser, just like a traditional FTP client. - Unmanaged File Handling: Safely inspect and manage physical server files and folders regardless of whether they are registered as Drupal File entities (FID).
- Keyboard & Screen Reader Optimized: Built strictly according to the WAI-ARIA Grid pattern (
grid→rowgroup→row→gridcell). Full keyboard navigation support (Arrow keys, Home/End, Enter, Backspace, Shift+F10). - Live Status Announcements: Employs throttled
aria-live="polite"regions announcing directory loading states, row details, and upload progress to screen readers without overwhelming the user. - Contextual Actions Menu: Accessibility-compliant right-click / context menu (
role="menu") providing single-click actions (Download, Copy Link, File Properties, ZIP Download) without visual UI clutter. - Accessible File/Image Field Widgets: Replaces complex third-party tools with a native, accessible widget featuring real-time percentage progress bars, smoothed speed metrics (MB/s), and graceful non-JS fallbacks.
📊 Entity & Views File Inventory
- Dynamic Views Integration: Enhances standard Drupal Views tables for registered File entities (FID) with real-time, batched download metrics without triggering per-row database query overhead.
- Entity & Field Usage Inspection: In-line expandable details (
<details>) showing parent entity connections, active revision references, and field labels—eliminating the need to navigate to separate core usage pages. - Orphan & Unused File Cleanup: Dedicated tab and dynamic SQL mapping to identify unreferenced files (both current and revision references) with safe multi-step bulk deletion powered by Drupal's Queue API and VBO.
🛡️ Enhanced Private File Security & .htaccess Auto-Healing
- Self-Healing Guard (
PrivateHtaccessSecurityGuard): Automatically detects and repairs missing, corrupted, or tampered.htaccessfiles in the Drupal private file root usingFileSecurity::htaccessLines()under atomic lock protection. - Granular Download Counter: Tracks verified HTTP 200
GETdownloads while ignoring partial206 Rangerequests, preview methods (HEAD,OPTIONS), and non-200 responses. Features configurable deduplication window (SHA-256 session hashing) and role-based tracking exclusions. - Detailed Permission Inspector: Evaluates complex access rules (UID exceptions, grant/deny roles, scheme security) and displays the effective access intersection for each file.
🏷️ Automated File Naming & Token Templates
- Token-Aware Config Entity Templates: Automates physical file renaming on
presavehooks using configurable token profiles (e.g.,[node:title],[user:uid],[file:timestamp]). - Safe Transliteration & Sanitization: Automatically converts non-ASCII characters, strips illegal punctuation, enforces lowercase formatting/separators (
-or_), and handles name collisions gracefully (-2,_2). - Bulk Renaming Queue: Execute safe, template-based bulk renaming across existing fields with pre-run breakdown reports, dry-run validation, and optional database safety checks.
💾 Disk Quota & File System Health
- Configurable Hosting Quota & Analytics: Tracks real disk usage against defined hosting limits (default: 100 GB) using optimized background directory iteration (
RecursiveDirectoryIterator) and cached metrics. - Comprehensive Breakdown: Categorizes site-wide file storage into semantic breakdowns (PDFs, Office Documents, Images, Audio, Video, Archives) with total file counts and MB/GB utilization.
- System Health Checks: Audits directory permissions, validates POSIX/Windows read-write access, and ensures target field directories exist prior to file upload operations.
Technical Specifications
Feature Details Drupal Compatibility Drupal 10, Drupal 11 Machine Nameaccessible_file_manager
Primary Route
/system/files
Accessibility Standard
WAI-ARIA 1.2 Grid Pattern, WCAG 2.1 AA
Background Processing
Queue API (accessible_file_manager_file)
Dependencies
Core file, image, user, options, token
Architectural Principles
- Zero-Invasive Overrides: Does not permanently alter core View configurations; wraps and enhances views at runtime (
override_url/override_path). - Strict Physical Integrity: URI and physical file moves are exclusively handled through
FileRepositoryInterface::move(). Direct raw SQL URI manipulations are strictly forbidden. - Idempotent Queue Operations: All background operations re-validate entity existence,
file_usagerecords, andFileReferenceResolvertargets at the exact moment of execution to prevent data loss.