Skip to content

Commit

Permalink
Import mediaUpload from @wordpress/editor
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 committed Feb 12, 2020
1 parent c4a400e commit 8b93f16
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 8b93f16

Please sign in to comment.