Option to change URL in media edit form

Created on 20 April 2021, over 3 years ago
Updated 13 October 2023, about 1 year ago

Problem/Motivation

Many content editors use the media edit form to copy the URL of a media source file and paste it into body text. Ideally, a Linkit or similar plugin would intercept that and substitute using the media_entity_file_redirect plugin - however, there are many cases where this has not been done. It might be handy to add an option to this module to change the file_link used in the file_generic widget to use the URL format provided by this module.

Proposed resolution

Attached patch adds an option to media types to 'Change URL of file preview to /document/[id]' (in addition to the existing 'Expose access to file via path /document/[id]'). If checked, the file_link used in the file_generic widget for the media's source field uses the 'document/[id]' URL instead of the URL created by file_create_url().

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇦Canada bgilhome Victoria

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024