Skip to content
This repository has been archived by the owner on Jun 4, 2018. It is now read-only.

Error #3

Open
jasonboateng opened this issue Mar 27, 2018 · 0 comments
Open

Error #3

jasonboateng opened this issue Mar 27, 2018 · 0 comments

Comments

@jasonboateng
Copy link

jasonboateng commented Mar 27, 2018

getBlob(path: string): Promise {
return new Promise((resolve, reject)=>{
this.platform.ready().then(() => {
window.resolveLocalFileSystemURL(path, (fileEntry)=> {
fileEntry.file(file => {
const fileReader = new FileReader();
fileReader.onloadend = (res: any) => resolve(new Blob([new Uint8Array(res.target.result)],
{type: 'image/jpeg'}));
fileReader.onerror = (error: any) => reject(error);
fileReader.readAsArrayBuffer(file);
});
});
});
});
}

window.resolveLocalFileSystemURL is not a function how to i fix
i tried calling platform.ready didnt work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant