Hello!
Sometimes plugins can be perfect, sometimes we use it with glitches. For the product that needs a little more care, we don’t always get a quick response when we contact the relevant developers.
In my case, it was a terrible UX experience because I couldn’t reset the data on a plugin.
When I asked to a friend what I could do as an alternative, he came back with a super favor Thanks a lot @lottemint.md
This code, which you can use with the Toolbox plugin, can reset the data on the plugins.
You can watch the gif for File Uploads> 50mb and Video Capture and Browser plugins. In theory, it should work on all plugins, I tested with these two.
Here is the code
function resetUploadCare() {
try {
let states = $('#plugin-uploadcare')[0].bubble_data.bubble_instance._states;
for (let i = 0; i < Object.keys(states).length; i++) {
let cell = Object.keys(states)[i];
states[cell](null)
}
} catch (e) {
let message = 'function resetUploadCare error: ' + e.message;
console.log(message)
}
}
resetUploadCare();
Attention to element IDs
It’s done!