How to cancel upload if image is oversize?
mu-yu opened this issue · 2 comments
mu-yu commented
I have tried to reject the promise, but it still upload the picture with base64 string.
mu-yu commented
I have debuged the code of this plugin, and found that filereader load
event is happened after removeBase64Image
function in error handler.
quill-image-uploader/src/quill.imageUploader.js
Lines 43 to 50 in fac65fe
quill-image-uploader/src/quill.imageUploader.js
Lines 60 to 63 in fac65fe
if the uploader rejected before load
happened, the placeholder won't deleted any more.
This usually happened when i wan't to reject uploader after check filesize.
This is same with issue #6 .
NoelOConnell commented
PR merged now.
Version 1.1.1 is released on NPM now with those changes.