Open
Description
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 :
const resizeFile = (file) =>
new Promise((resolve) => {
Resizer.imageFileResizer(
file,
300,
300,
'JPEG',
100,
0,
(uri) => {
// resolve(uri);
},
'base64'
);
});
Metadata
Metadata
Assignees
Labels
No labels