Skip to content

Commit

Permalink
Image Block: Fix dropping images on the image block
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Aug 14, 2017
1 parent 9f7f1bb commit fe9d0fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blocks/library/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ registerBlockType( 'core/image', {
const uploadButtonProps = { isLarge: true };
const onSetHref = ( value ) => setAttributes( { href: value } );
const uploadFromFiles = ( event ) => mediaUpload( event.target.files, setAttributes );
const dropFiles = ( files ) => mediaUpload( files, setAttributes );

const controls = (
focus && (
Expand Down Expand Up @@ -149,7 +150,7 @@ registerBlockType( 'core/image', {
label={ __( 'Image' ) }
className={ className }>
<DropZone
onFilesDrop={ uploadFromFiles }
onFilesDrop={ dropFiles }
/>
<FormFileUpload
isLarge
Expand Down

0 comments on commit fe9d0fd

Please sign in to comment.