Media library documents

Created on 25 November 2019, over 5 years ago
Updated 15 February 2025, 2 months ago

The default settings for uploading a document with the media library could be improved, especially now we've got the wysiwyg media button

The default currently when you attempt to upload a new document via the media library is for it to only ask for the "Document" (field_media_document) file

So after uploading your file and inserting it into ckeditor editor it will show the literal file name e.g. document.pdf with no way to change the text for the link to the document from within ckeditor/media library (Because the default display mode is set to "Generic file"). I think the majority of people would want to set the link text e.g. "Our named document" which isn't currently possible in this content flow

As a solution I think it would be good if on the field_media_document field the "Enable Description field" was enabled by default. For some reason when looking at the document form display for media library (admin/structure/media/manage/document/form-display/media_library) the Document field defaults as disabled (even though it shows in the media library which is confusing and not what you'd expect)

To get the description field to show in the media library you have to move the Document field out of disabled. So that should also be enabled for that form display by default

Does this all sound logical? I can see this as being a very common use case. Enabling the description field shouldn't cause any issues, if someone wants to show the literal name they can just not enter anything in the description field.

Feature request
Status

Active

Version

11.0 🔥

Component

media system

Created by

🇬🇧United Kingdom maseyuk

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.

  • 🇵🇰Pakistan izaidjadoon

    I encountered the same issue while working on Drupal 11. Your explanation really helped clarify the issue, and enabling the description field made the process much smoother. Thanks for pointing this out—really appreciate it!

Production build 0.71.5 2024