Issue #3951Opened November 17, 2021by majidh13 reactions

BUG: Events On assetmanager not working

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

chrome

Reproducible demo link

no link

Describe the bug

editor.on("asset:upload:start",console.log) not working

after versiom 0.17.26 not working assetmanager events asset:upload:start or asset:upload:end on editor

i am debuging code and find this

     // file: src/asset_manager/index.js 
      const { module } = this; // module is undefined
      module && module.__propEv('asset:upload:start');

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (2)

cusmaiJanuary 27, 20223 reactions

Hi, still not working, events are not fired:

editor.on('asset:upload:start', () => {
      // The upload is started
      console.log('Upload started');
});
editor.on('asset:upload:end', () => {
      // The upload is ended (completed or not)
      console.log('Upload ended');
});
editor.on('asset:upload:error', (err) => {
      // Error handling
});
editor.on('asset:upload:response', (response) => {
     // Do something on response
     console.log(response);
});

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.