Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Private File Auto Redirect

Security covered Under active development 3 sites

This module automatically redirects users to the latest version of a private file if its filename has changed. This ensures that old links and bookmarks still direct to the correct, most current file associated with a media entity.

This module attempts to solve the ongoing issues with File management in Drupal, especially when attached to Media entities and the issues surrounding the file urls presented to the user.

Solves a similar problem as Media entity download without the need for any additional routes.

However, this module only works with files served from the Private file system

How does it work?

It is fairly common for Content editors to update documents, or other files in the lifecycle of a CMS. If these files share the same file name, Drupal will rename the file to be unique, often adding a -0, -1, etc to the end of the filename.

This is essentially unavoidable, especially due to the fact that Drupal no longer deletes files from the file system

This renaming can lead to flow on issues where the initial url to a file has been shared already - such as people bookmarking it, other sites linking to it, marketing material containing it, etc.

This module solves the issue by automatically redirecting a user to the latest file attached to a Media entity corresponding to that particular file.

Requirements

This module requires the core fix at #1452100: Private file download returns access denied, when file attached to revision other than current

Drupal 10–11 PHP 8.1

Ask your assistant about Private File Auto Redirect

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • media Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Feb 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
2.1.1 Stable 10–11 PHP 8.1 Sep 3, 2024
2.1.0 Stable 10–11 PHP 8.1 Sep 3, 2024
2.0.0-rc2 Pre-release 9–10 Feb 2, 2023