unlayer / react-email-editor

Drag-n-Drop Email Editor Component for React.js
https://unlayer.com/
MIT License
4.6k stars 742 forks source link

How to display errors when using Custom File Storage #414

Open willianjusten opened 3 months ago

willianjusten commented 3 months ago

Hey guys, I'm trying to upload my files to Cloudinary, which I managed to work using the documentation.

But I'm having some issues to display errors, the done function appears to only receive progress and url. From the example provided you just throw an error (which is captured in the console), but not displayed anywhere.

I'd like to display the same errors when using the default uploader, like this:

image


Another detail, even though I disabled svgUpload, the input accept any type of image, which is not great for UX and I even need to check the type to upload or not...

image

It would be nice to have a way to pass to done the error like done({ error: 'bla' }) or at least capture the error itself to display on the input...

cc @brunolemos