-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'multiple' property in MediaPlaceholder forces gallery [GB3.6.2] #9113
Comments
A playlist block is being worked on in #8396. Consider checking the work there first (if you haven't already!) to see if anything in that code can help answer your question. |
Hi, @designsimply, Thanks for your prompt reply and for pointing me in that direction. |
Regardless of how the playlist block will be eventually implemented, the Pull request: #9139 |
Seems like a valid enhancement. |
SCENARIO
I am trying to create a Gutenberg block for an audio player I developed. The simplest approach would seem to be rendering a MediaPlaceholder for the users to drag, uploads or select audio files. Since the plugin also creates playlists of multiple audio files, I was experimenting with the
multiple
property.PROBLEM
The problem I found is that setting
multiple
totrue
forcesgallery
to betrue
as well.The relevant code is on line 130 of the MediaPlaceholder index.js file where both properties
multiple
andgallery
of the MediaUpload component receive the value set formultiple
of the MediaPlaceholder.As a result, the Media uploader disregards the
type
property (which is set to'audio'
) and shows all the mime types.I am not sure whether this behavior is by design, but of course this prevents us from using the MediaPlaceholder to select multiple files of a specific type.
The text was updated successfully, but these errors were encountered: