From 8b93f16fb5dcba7d3095ef9c6f612aec5f2d9cd1 Mon Sep 17 00:00:00 2001 From: Paul Bunkham Date: Wed, 12 Feb 2020 11:17:27 +0000 Subject: [PATCH] Import mediaUpload from @wordpress/editor With the components moving from the @wordpress/editor package to @wordpress/block-editor the import statements were updated. However, the mediaUpload function didn't move packages and this broke part of some of the meda block's upload mechanisms. This change swaps back to importing mediaUpload from @wordpress/editor --- extensions/blocks/slideshow/edit.js | 3 ++- extensions/blocks/tiled-gallery/edit.js | 2 +- extensions/blocks/videopress/editor.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/blocks/slideshow/edit.js b/extensions/blocks/slideshow/edit.js index cc8635cf4acea..9806cc48b9fd7 100644 --- a/extensions/blocks/slideshow/edit.js +++ b/extensions/blocks/slideshow/edit.js @@ -7,7 +7,8 @@ import { compose } from '@wordpress/compose'; import { filter, get, map, pick } from 'lodash'; import { isBlobURL } from '@wordpress/blob'; import { withDispatch, withSelect } from '@wordpress/data'; -import { BlockIcon, MediaPlaceholder, mediaUpload } from '@wordpress/block-editor'; +import { BlockIcon, MediaPlaceholder } from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { DropZone, FormFileUpload, withNotices } from '@wordpress/components'; /** diff --git a/extensions/blocks/tiled-gallery/edit.js b/extensions/blocks/tiled-gallery/edit.js index b9f34c0716f46..b60bd5c36c809 100644 --- a/extensions/blocks/tiled-gallery/edit.js +++ b/extensions/blocks/tiled-gallery/edit.js @@ -10,8 +10,8 @@ import { InspectorControls, MediaPlaceholder, MediaUpload, - mediaUpload, } from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { DropZone, FormFileUpload, diff --git a/extensions/blocks/videopress/editor.js b/extensions/blocks/videopress/editor.js index bcfc27ac4d272..3b27431796d3e 100644 --- a/extensions/blocks/videopress/editor.js +++ b/extensions/blocks/videopress/editor.js @@ -3,7 +3,7 @@ */ import { createBlobURL } from '@wordpress/blob'; import { createBlock } from '@wordpress/blocks'; -import { mediaUpload } from '@wordpress/block-editor'; +import { mediaUpload } from '@wordpress/editor'; import { addFilter } from '@wordpress/hooks'; import { every } from 'lodash';