I am trying to choose pdf of doc files using fileChooser plugin of IONIC 3 and I am getting the response like this
content://com.coloros.filemanager/file_share/storage/emulated/0/documents/certificatenew.pdf
then I am trying to get the native path in android devices using filePath plugin of IONIC 3 but I am getting an error like this
column ‘_data’ does not exist
I am getting this issue in Android Naugat and Oreo. And also, getting the native path of the image files using the same process, working just fine.
The following is the part of the code,
…
this.fileChooser.open().then((url) => {
this.filePath.resolveNativePath(url)
.then(filePath => {
let currentPath = filePath.substr(0, filePath.lastIndexOf('/') + 1);
let currentName = filePath.split('/')[filePath.split('/').length - 1];
let fileext = currentName.split(".").pop();
var d = new Date(),
n = d.getTime(),
newFileName = n + '.' + fileext;
…
Can anyone tell me what to do? and what is the reason behind it?