Hi All,
I am using photo library to retrieve photo and get this.
{“id”:“12;/storage/emulated/0/IMG_20180502_224855.jpg”,“fileName”:“IMG_20180502_224855.jpg”,“width”:480,“height”:480,“creationDate”:“2018-05-02T23:20:37.000Z”,“latitude”:0,“longitude”:0,“albumIds”:[“1389444597”],“thumbnailURL”:“cdvphotolibrary://thumbnail?photoId=12%3B%2Fstorage%2Femulated%2F0%2FIMG_20180502_224855.jpg&width=512&height=384&quality=0.5”,“photoURL”:“cdvphotolibrary://photo?photoId=12%3B%2Fstorage%2Femulated%2F0%2FIMG_20180502_224855.jpg”},
My question is how to get the photo file object from it. I try to get file path and file name from id , file path is :/storage/emulated/0/, file name is : IMG_20180502_224855.jpg, and then try to read it using file plugin like
file.readAsDataURL(fileInfo.fileDir,fileInfo.fileName).then(…), but got encoding error,
I also tried to using file.resolveLocalFilesystemUrl(image.photoURL), but got the same error.
Please help how to get the file object, thanks.