Skip to content

Commit

Permalink
Import mediaUpload from @wordpress/editor (#14651)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pablinos authored Feb 13, 2020
1 parent c85a654 commit a86936f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion extensions/blocks/slideshow/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/tiled-gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
InspectorControls,
MediaPlaceholder,
MediaUpload,
mediaUpload,
} from '@wordpress/block-editor';
import { mediaUpload } from '@wordpress/editor';
import {
DropZone,
FormFileUpload,
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/videopress/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit a86936f

Please sign in to comment.