Problem/Motivation

Maybe you are creating new Gutenberg custom blocks with media fields, the module provides a way to use the component named MediaUpload and it has a prop named AllowedTypes, nevertheless, maybe you have multiple media entity types with the same mime type, in that case, we should be able to filter our media library depending on the bundles we want to get into the media browser.

Steps to reproduce

Install drupal out of the box.
Install Gutenberg Module
Create a new custom module and a new Gutenberg custom block
Create a new media type with image mime type and name it "My Image library"
Add a MediaUpload field/component to the Gutenberg custom block and assign to the AllowedTypes prop an array with the value 'image'

We are not able to create a MediaUpload field just with the "My image library" bundle, we will see all the media types for the same bundle, no option to filter desired bundles for the media browser

Comments

sergiogsanchez created an issue. See original summary.

sergiogsanchez’s picture

sergiogsanchez’s picture

sergiogsanchez’s picture

sergiogsanchez’s picture

sergiogsanchez’s picture

sergiogsanchez’s picture

sergiogsanchez’s picture

Version: 8.x-2.1 » 8.x-2.x-dev
Status: Active » Needs review

marcofernandes’s picture

Status: Needs review » Fixed

Nice feature. Thank you Sergio.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.