1import { FilePath } from '@ionic-native/file-path/ngx';
2import { File, FileEntry } from '@ionic-native/File/ngx';
3
4// uri is something like file:///data/user/0/com.company.app/files/1591951119970.jpeg
5 this.file.resolveLocalFilesystemUrl(finalPhotoUri.uri)
6 .then(entry => {
7 (<FileEntry>entry).file(file => {
8 // this is the actual file as File object
9 const photo = this.imageService.readFile(file);
10 console.log(photo);
11 }
12 );
13 })
14 .catch(err => {
15 console.log('Error while reading file.');
16 });
17
18