-
Hi, uploadImage works fine with me when everything is ok when the upload is completed successfully. Sample code
but when it failed, the editor show the local image! I don't think this is correct behavior. my question is: how to handle the exception of "upload image" a correct way? My current solution is that... when the uploading failed, my function will still return a valid image URL.. such as: https://mysite.com/image-not-upload-successfully.png to show user that the operation is failed and they remove the newly inserted image and do the upload again. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You should make sure that your upload function throws an error on failure. The editor will then display an error state instead of the local image cache |
Beta Was this translation helpful? Give feedback.
You should make sure that your upload function throws an error on failure. The editor will then display an error state instead of the local image cache