I want to have exactly the Media Upload Popup that is used when supplying the gallery
attribute to the <MediaUpload>
Component. Difference to normal Mediaupload is, that you see a sidebar on the left, and after selecting the items, you reach a view, where you can reorder media like in first image below, not like in the second one that appears with the code I am using:
<MediaUpload
onSelect={ this.onSelectMedia }
/*todo here should be gallery attr but it will disable video selection*/
allowedTypes={ [ 'image', 'video' ] }
accept="image/*,video/*"
multiple
value={ this.media.map( ( m ) => m.mediaId ) }
render={ ( { open } ) => (
<IconButton
label={ __( 'Edit Media' ) }
icon="images-alt2"
onClick={ open }
/>
) }
/>
When I add the gallery attribute, the allowedTypes will somehow be overridden by the gallery attribute and only images will be shown in the MediaUpload Window.