Skip to content

Relative URIs are not supported. #327

@AngrySKL

Description

@AngrySKL

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions