You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the Upload.resize and Upload.applyExifRotation function for my mobile app, and I found that when the image uploaded is too large, the HTML5 canvas drawImage function will not work right. Then the canvas toDataUrl will return only a 'data,;' string, so the upload.dataUrltoBlob function will throw an error.
It seems to be a memory problem, but I think you should catch the error and reject the promise. Here is your code:
Thanks for your work and share!
I used the Upload.resize and Upload.applyExifRotation function for my mobile app, and I found that when the image uploaded is too large, the HTML5 canvas drawImage function will not work right. Then the canvas toDataUrl will return only a 'data,;' string, so the upload.dataUrltoBlob function will throw an error.
It seems to be a memory problem, but I think you should catch the error and reject the promise. Here is your code:
And I think it is better to change to the blow code:
The text was updated successfully, but these errors were encountered: