media_alias_display
3,663 sites
Security covered
This module allows for direct viewing of a file with the URL alias. Instead of viewing the media entity and all the fields users can view a file (like a PDF). Instead of sites/default/files/name-of-file it will display the URL alias.
This is useful if a media object is referenced in multiple locations the media object can be updated with a new file and reflected in all instances automatically.
Recommended modules
- Pathauto (https://www.drupal.org/project/pathauto)
- Drupal Core Workflow
Installation
Install as you would normally install a contributed Drupal module. Visit:
https://www.drupal.org/docs/extending-drupal/installing-drupal-modules
for further information.
Configuration
Once the module is installed.
- Go to /admin/config/media/media-settings and verify "Standalone media URL" is checked.
- Go to /admin/config/media/media_alias_display to configure what media bundles will use this module.
Tricks
- If you're viewing a file with an alias and need help finding the media object just append ?edit-media. This will redirect you straight to the media edit page.