{"action":"opened","issue":{"url":"https://api.github.com/repos/artf/grapesjs/issues/646","repository_url":"https://api.github.com/repos/artf/grapesjs","labels_url":"https://api.github.com/repos/artf/grapesjs/issues/646/labels{/name}","comments_url":"https://api.github.com/repos/artf/grapesjs/issues/646/comments","events_url":"https://api.github.com/repos/artf/grapesjs/issues/646/events","html_url":"https://github.com/artf/grapesjs/issues/646","id":282281914,"number":646,"title":"Images dropped onto image picker get uploaded twice","user":{"login":"tomichal","id":54234,"avatar_url":"https://avatars0.githubusercontent.com/u/54234?v=4","gravatar_id":"","url":"https://api.github.com/users/tomichal","html_url":"https://github.com/tomichal","followers_url":"https://api.github.com/users/tomichal/followers","following_url":"https://api.github.com/users/tomichal/following{/other_user}","gists_url":"https://api.github.com/users/tomichal/gists{/gist_id}","starred_url":"https://api.github.com/users/tomichal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomichal/subscriptions","organizations_url":"https://api.github.com/users/tomichal/orgs","repos_url":"https://api.github.com/users/tomichal/repos","events_url":"https://api.github.com/users/tomichal/events{/privacy}","received_events_url":"https://api.github.com/users/tomichal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-15T00:19:31Z","updated_at":"2017-12-15T00:19:31Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Set the asset manager with the `dropzone` option set to `true` (which is `true` by default), something like that:\r\n```\r\ngrapesjs.init({\r\n  ...\r\n  assetManager: {\r\n     dropzone: true\r\n     assets: <list of assets>,\r\n     upload: <upload url>,\r\n     autoAdd: true\r\n  },\r\n})\r\n```\r\nthen 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.\r\n\r\nI 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."}}
{"actor":{"display_login":"tomichal"}}