Ionic5 IOSFilePicker convert uri to blob
I use this method:
getFiles(){
this.filePicker.pickFile().then(uri => {
console.log('uri '+uri);
})
.catch(err => console.log('Error', err));
}
And I want convert uri to blob because I need to upload it. I tried several methods that I found on the forums but none of them work.
Seeing as you have the path on the device (uri) you can use
cordova-plugin-file
to fetch the file and read its contents
https://cordova.apache.org/docs/en/10.x/reference/cordova-plugin-file/