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)
@tomichal correct, but dropzone was disabled by default in https://github.com/artf/grapesjs/releases/tag/v0.12.50 we've discussed that here #507
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.
Issue #372
Asset Manager not automatically add images to assets after uploading
The JSON response of an upload is like this {"data":["http://url.com/flower.jpg"]} The response event is working.In the response event resp...
Issue #401
Cannot upload images
Hi, while uploading an image through asset manager, I get the following error: Assetmanager configuration at editor init looks like Folder...
Issue #998
[BUG] Asset Manager sends empty request when uploading image
Description: GrapesJS editor is initialized in an editor.html file as follows: localhost:9001 is a local IIS server running PHP5. The conte...
Issue #1816
Not allowing to upload same image on same the position after delete that image
Ajax call which is uploading image file in assests folder It's working fine to add an image from the local. But in another scenario, It's n...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.