Need to set errorMessage in registerCallback or get the currunt selected image url in registerCallback

This issue has been tracked since 2022-09-08.

I'm trying to upload a file in my Custom File Storage.
But the problem is in the exception if I want to show the error message inside the image block as this error came for the below code.

Screenshot from 2022-09-08 16-13-33

       emailEditorRef.current.editor.registerCallback('image', (file, done) => {
                var data = new FormData()
                const selectedFile = file.attachments[0]
                data.append('files[]', selectedFile)
                done({ progress: 0 });
                fetch('/uploads', {
                    method: 'POST',
                    headers: {
                        'Accept': 'application/json'
                    body: data
                }).then(response => {
                    return response.json()
                }).then((res) => {
                    done({ progress: 100, url: res.url })
                }).catch((e) => {
                    done({ progress: 100 });

I try to find a way to set this error in done() but couldn't.
I want to get the previously selected image URL in the image block so that I can reselect it on the exception like this

      progress: 100,
      url : prev_url

or I want a key like errorMessage in done so that I can set it on my own.

     errorMessage : 'Something went wrong'
More Details About Repo
Owner Name unlayer
Repo Name react-email-editor
Full Name unlayer/react-email-editor
Language JavaScript
Created Date 2017-10-01
Updated Date 2022-12-05
Star Count 3598
Watcher Count 48
Fork Count 627
Issue Count 163


Issue Title Created Date Updated Date