`src.match` is not a function
AILazerka opened this issue · comments
What?
When uploading image and trying to scroll or move slider for zoom size is adjusted but there are lots of errors in the browser console regarding the failing url check: src.match is not a function
Versions
latest ngx-croppie
(3.0.0)
croppie
version (2.6.3-2.6.4)
Steps to reproduce
- Checkout https://github.com/mainawycliffe/cropped-image-form-control-in-angular-demo
- Upgrade to use latest
ngx-croppie
(3.0.0) and compatiblecroppie
version (2.6.3-2.6.4) - Build and run app
- Upload test image using
blob
type-based upload selector - Scroll over the image to change side
- Checkout console error
Hi! The problem is that in your image-control you are passing back to croppie the image that is returning as a Blob, and a Blob does not have the .match function, is not a string. You should store the result in another field. The performance should be better too.
newImageResultFromCroppie(img: string) {
**this.croppieImage** = img;
this.propagateChange(this.croppieImage);
}