ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
129 stars 86 forks source link

Ionic FilePath not working, how to get the file path for Android 11 #1144

Open Shahrukh-cyber opened 2 years ago

Shahrukh-cyber commented 2 years ago

I'm submitting a ... (check one with "x") [x] bug report

this.androidFileChooser .open({ mime: 'application/pdf' }) .then((file) => { This gives me this response : "content://com.android.providers.downloads.documents/document/11654".

The problem is that I need to get the reallocation of the file to convert it to base 64 and send it with a POST request to the client server. So before all these problems, I was using Android File Path from Ionic : https://ionicframework.com/docs/native/file-path

this.filePath.resolveNativePath(file).then((filePath) => { And I was receiving file:///storage/emulated/0/Download/pdffile.pdf Using this, I could transform it in base64 and everything worked well.

Now, it returns me nothing for Android 11. So All the process can’t work if I don’t have this filepath.