Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Media: Refactor MediaUpload, MediaPlaceholder and mediaUpload to support arrays with multiple supported types. #9707
mediaUpload util only allowed the uploads of a single type or all types. That makes impossible for a block to accept just the upload of images and videos.
This PR enhances the mediaUpload util and related components ( MediaUpload, MediaPlaceholder) to accept an allowedTypes prop with an array of all the supported types.
I tried to upload to each media block and verified no error occurred.
Required for: #9416
changed the title from
WIP utils: mediaUpload: Support multiple type string in mediaUpload allowedType
utils: mediaUpload: Support multiple type string in mediaUpload allowedType
Sep 7, 2018
Hey @jorgefilipecosta. This is working really well in my tests, and it's great to have consistency with the name of the prop.
I spotted a couple of issues with the wrong prop being deprecated in a couple of places, which is important to fix.