Skip to content

Feature: Allow filtering when using the file widget #1345

@leptest

Description

@leptest

As a developer, it would be great to have an option that could pre-filter what is shown in the media picker for when a content editor uses the file widget.

For instance, if there was a "Related PDFs" section for a content editor to populate. When they open the media picker, only seeing a list of PDFs would be a nice UX. This helps a developer control how a user interacts with the content.

Maybe it could live in the config.yml file and be a RegEx or globbing pattern? e.g:

-
  label: 'Related documents'
  name: documents
  widget: list
    -
      label: File
      name: filePath
      widget: file
      filter: product-*.{pdf,docx}

Sorry, I wouldn't know where to start for a PR on this one, but i'm more than happy to help out where i can.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions