pwlin / cordova-plugin-file-opener2

A File Opener Plugin for Cordova
MIT License
314 stars 583 forks source link

Relative URIs are not supported. #327

Open AngrySKL opened 2 years ago

AngrySKL commented 2 years ago

ts: this.fileOpener .open( '/assets/files/Mobile Code Style.docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ) .then(() => console.log('File is opened')) .catch((e) => console.log('Error opening file', e));

code: CordovaResourceApi resourceApi = webView.getResourceApi(); Uri fileUri = resourceApi.remapUri(Uri.parse(fileArg));

cordova info

Here is the output: will throw exception Relative URIs are not supported.

Plugin version

cordova plugin version | grep cordova-plugin-file-opener2

Here is the output:

Sample Code that illustrates the problem

Logs taken while reproducing problem

Run

adb logcat PluginManager:V CordovaPlugin:V CordovaLog:V chromium:V *:S

while testing the bug in your app to get some output from your error. This will help you to understand more about the nature of your problem.