-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileReader': parameter 1 is not of type 'Blob'. #64
Comments
I have the same issue. Did u figured out how to fix it? i'd be appreciate it |
I was unable to do this in the frontend, so I moved the image processing to the backend side |
Same here. I create an image like this const createImage = (imageData: any) => {
const image = new Image();
image.src = `url(data:image/jpeg;base64,${imageData})`;
return image;
}; and then pass it into const resizeFile = file =>
new Promise(resolve => {
Resizer.imageFileResizer(
file,
300,
300,
'JPEG',
100,
0,
uri => {
resolve(uri);
},
'base64'
);
}); |
Same here |
same here 2023 :( |
I did a walk around, I was getting an image URL from the camera, I got the image itself like this
then I passed it to the resizer and voila
I am also using cropperjs, so first crop, then resize. the other functions `const onResizeImage = async (imageFile: any) => {
|
I was trying to get the local image and tried to resize it, but getting this error..
Unhandled Rejection (TypeError): Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.
I have imported the file
import sample from './assets/sample.jpg';
and passed it into this method :
The text was updated successfully, but these errors were encountered: