-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Needs DevReady for, and needs developer effortsReady for, and needs developer efforts[Feature] MediaAnything that impacts the experience of managing mediaAnything that impacts the experience of managing media[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The MediaUpload component gallery and allowedTypes attributes do not function as documented when used in combination. If gallery is used, effective allowedTypes appears to always be image.
This forces major development efforts to replicate the same functionality where other file types are in play, as with Document Gallery for example.
Step-by-step reproduction instructions
- Create MediaUpload element with below configuration and non-image files available. Confirm that the available files in dialog are exclusively images.
<MediaUpload
gallery={true}
allowedTypes='application,video,text,audio,image'
render={({open}) => (
<Button
variant='secondary'
onClick={open}
>
Select files
</Button>
)}
/>
- Create MediaUpload element with below configuration and non-image files available. Confirm that all files are displayed in dialog.
<MediaUpload
allowedTypes='application,video,text,audio,image'
render={({open}) => (
<Button
variant='secondary'
onClick={open}
>
Select files
</Button>
)}
/>
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress Version: 6.2
- Browser: Chrome
- Platform: Windows 10
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs DevReady for, and needs developer effortsReady for, and needs developer efforts[Feature] MediaAnything that impacts the experience of managing mediaAnything that impacts the experience of managing media[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.