Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative URIs are not supported. #327

Open
AngrySKL opened this issue Nov 16, 2021 · 0 comments
Open

Relative URIs are not supported. #327

AngrySKL opened this issue Nov 16, 2021 · 0 comments

Comments

@AngrySKL
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant