I am using ngx-image-cropper to crop my image. I need to retrieve the cropped image from ngx-image-cropper to upload. However, I can't retrieve File object through this.
This is the code that I used to trigger when the user crop the image,
imageCropped(event: ImageCroppedEvent) {
this.croppedImage = event.base64;
this.cropperHeight = event.height;
this.cropperWidth = event.width;
this.croppedEvent =event.file;//This is how i tried to get file
}
When I am trying to upload the file it has some error. So it is better to provide a way to get file object from ngx-image-cropper