nativepath: any;
uploadfn(){
this.fileChooser.open().then((url) => {
(<any>window).FilePath.resolveNativePath(url, (result) => {
this.nativepath = result;
this.readimage();
}
)
})
}
readimage() {
(<any>window).resolveLocalFileSystemURL(this.nativepath, (res) => {
res.file((resFile) => {
var reader = new FileReader();
reader.readAsArrayBuffer(resFile);
reader.onloadend = (evt: any) => {
var imgBlob = new Blob([evt.target.result], { type: 'image/jpeg'});
//do what you want to do with the file
}
})
})
}