Allow to change upload formats for managed_file

Created on 8 June 2023, about 1 year ago
Updated 15 June 2023, about 1 year ago

There is currently no way to change the formats for adding files

✨ Feature request
Status

RTBC

Version

1.0

Component

Code

Created by

🇺🇦Ukraine NotifyOne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @NotifyOne
  • Status changed to Needs work about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    Composer require failure
  • @notifyone opened merge request.
  • Status changed to Needs review about 1 year ago
  • Issue was unassigned.
  • Status changed to RTBC about 1 year ago
  • 🇮🇳India Shyam_Bhatt Gujarat

    I have checked the "MR !11" working fine with the field type "managed_file".

    Please check the below steps:

    1. Install and enable the Menu Link Attributes module.
    2. Go to the configuration page "/admin/config/menu_link_attributes/config".
    3. Add the "managed_file" field as per the below code:
      icon-attr:
          label: 'icon label'
          type: managed_file
          upload_location: 'public://module-images/menu-link-images/'
          file_validate_extensions: 'gif png'

    The "file_validate_extensions" key was added to the patch. so we can restrict the file with different extensions.
    Please check the after image.

    It will not allow a jpg file.

    It will allow only png and gif files.

Production build 0.69.0 2024