Universal File Utils
This module provides a system for developers to manage file operations like checking access, downloadability, copying, and removal. It uses event subscribers to allow other modules to control or influence these file actions.
Provides an event-based system for checking file access and file
downloadability plus file copying and removal.
This module does nothing on its own and is for developers to simplify their
task when deciding whether a file can be displayed or downloaded.
Client modules should have event subscribers for either (or both):
- - UniversalFileDownloadEvent
- - UniversalFileAccessEvent
The file download event allows a module to decide whether it wants to permit
the download (call `$event->denyDownload()` if not) and can also add headers
if that's needed. An event subscriber will need to be created for that.
The file access event allows a module to decide whether a file (probably an
image) can be viewed or downloaded.
There is a a base event subscriber for this which should be extended, the
client module only needs to provide some data through two methods to decide
whether access is permitted.
Apart from checking download and access, the service also provides the ability
to copy and remove files.
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
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 3.0.0-beta4 | Pre-release | 10–11 | Fix incorrect return value for hook_file_access(). | Mar 16, 2026 | |
| 3.0.0-beta3 | Pre-release | 10–11 | Fix inconsistency with new Symfony event dispatch. | Mar 15, 2026 | |
| 3.0.0-beta2 | Pre-release | 10–11 | Fix Symfony event change | Feb 16, 2026 | |
| 3.0.0-beta1 | Pre-release | 9–11 | Bringing up to code from 9 to 11. | Aug 27, 2025 | |
| 2.0.0-beta1 | Pre-release | 9–11 | Bringing up to code from 9 to 11. | Aug 27, 2025 |