Issue #646Opened December 15, 2017by tomichal0 reactions

Images dropped onto image picker get uploaded twice

Question

Set the asset manager with the dropzone option set to true (which is true by default), something like that:

grapesjs.init({
  ...
  assetManager: {
     dropzone: true
     assets: <list of assets>,
     upload: <upload url>,
     autoAdd: true
  },
})

then drop an image onto the dropzone within the asset manager modal (from the 'gjs-blocks-basic' plugin), then the image gets uploaded to the backend twice.

I think this is because the dropzone option turns on uploading images by dropping them onto the editor canvas, so when you drop it onto the asset manager dropzone the event gets passed through to editor canvas from the asset manager dropzone (or vice-versa), and so there are two upload triggering events happening, where there should only be one.

Answers (2)

lock[bot]September 18, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.