Move the media entity view route to /media/{media}/view

Created on 8 July 2021, over 3 years ago
Updated 18 August 2023, over 1 year ago

By submitting patches for review, you agree to the Developer Certificate of Origin. A copy of this agreement can be found in the project root, named CONTRIBUTING.txt.

Problem/Motivation

The primary motivation in creating this module was to allow users to set a URL alias for media entities so that files could be downloaded at a stable, human-friendly path name. In order to accomplish this, the canonical route had to be replaced; in effect this forces "Standalone media URL" to be enabled, but the entity view is replaced with a direct download. Therefore, it is not possible to view media items at /media/{id}.

Proposed resolution

Move the media entity view route to /media/{media}/view so that media items can still be viewed on the page instead of in the browser.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs work

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Chris Matthews

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • When applying the patch from #12, Image and Video Media entities worked as expected, while Audio File and Document Media entities did not. I could view Audio File and Document Media entities via the media/{view}/{id}/view path, but I could not download these media items via media/{view}/{id} or media/{id}.

Production build 0.71.5 2024