Add option for default disposition

Created on 15 September 2021, about 3 years ago
Updated 12 September 2024, 2 months ago

Problem/Motivation

https://www.drupal.org/project/media_entity_download/issues/3008834 added functionality to set the disposition of downloads (attachment or inline) via a query parameter, but defaulting to 'attachment' if the query parameter is absent. It would be nice to be able to add an option to set the default disposition in this case.

Proposed resolution

Attached patch adds a media_entity_download.settings config entity with 'default_disposition' key. There is no UI or config creation for existing installs, as it stands dev would need to create media_entity_download.settings in the config sync directory with a 'default_disposition' key set to 'attachment' or 'inline'. Current default 'attachment' used if no config entity exists.

Remaining tasks

Admin form.

Feature request
Status

Needs review

Version

2.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