Allowed file extensions textfield extends size to 1024

Created on 16 August 2019, about 5 years ago
Updated 29 October 2024, about 9 hours ago

Problem/Motivation

This module configurable option "Allowed file extensions" does not support more than 128 characters.

Proposed resolution

Extend the "Allowed file extensions" text field to 1024 characters.

Remaining tasks

Needs usability review

User interface changes

Change the input type to textarea or not

API changes

None

Data model changes

None

Release notes snippet

None

✨ Feature request
Status

Needs review

Component

Code

Created by

πŸ‡΅πŸ‡ΉPortugal dgaspara

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

    Used to alert the usability topic maintainer(s) that an issue significantly affects (or has the potential to affect) the usability of Drupal, and their signoff is needed. When adding this tag, make it easy to review the issue. Make sure the issue summary describes the problem and the proposed solution. Screenshots usually help a lot! To get sign-off on issues with the "Needs usability review" tag, post about them in the #ux channel on Drupal Slack, and/or attend a UX meeting to demo the patch and get direct feedback from designers/UX folks/product management on next steps. If an issue represents a significant new feature, UI change, or change to the general "user experience" of Drupal, use Needs product manager review instead. See the scope of responsibilities for product managers.

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.

  • πŸ‡ΊπŸ‡ΈUnited States cgmonroe

    IMHO the #5 patch which just increases the max car lenght is the way to go.

    The patch with a textarea needs some extra code to handle cases like on extension per line, blank lines, extra spaces before/after the lines, and possible other user input cases created by using a text area.

    The majority of cases will only have a handful over extensions easily managed on one line. But there are special cases where there are dozens of accepted extensions (e.g. site sharing scientific research results that come in many flavors.. I know use zip..but researchers don't like it...) that the max length now supports. This keeps it simple and works for all but extreme conditions.

  • πŸ‡ΊπŸ‡ΈUnited States cgmonroe

    Just found that the #5 patch was incomplete. It allowed more chars in the form but when it was exported to a config yml file, it got truncated. Attached is a patch that also changes the config schema to use text instead of string. This lets long extensions values get exported correctly. Will not effect any existing yml files as the syntax is the same.

Production build 0.71.5 2024