Closed mflash123 closed 4 years ago
You must change last parameter to blob.
let filesToStore = 'string' Resizer.imageFileResizer( file, 331, 700, 'JPEG', 100, 0, blob => { filesToStore = blob }, 'blob' ) console.log(filesToStore)
I have tried this but its shows me blank result. What am I doing wrong?
var imageURI = '';
const resizedImg = await Resizer.imageFileResizer(
fileList.fileList[0].originFileObj,
300,
300,
'JPEG',
100,
0,
uri => {
imageURI = uri
console.log(uri )
},
'blob'
);
console.log(resizedImg)
console.log(imageURI)
I find example of this
And if I make console.log(filesToStore) it works. But I thinks there a some promise or what, because I cant get result when page loaded. Only after few seconds.
So, how can I get result string? Example:
filesToStore returns 'string', not blob result.