ionic-team / ionic-team/cordova-plugin-ionic-webview

Problem with convertFileSrc on android

Open
#397 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
493
Forks
410
PR merge metrics
No merged PRs in 30d

Description

When doing the following (can be done in the debug browser console attached to and android app):
```
let path = cordova.file.applicationDirectory + "www/" + relativePath;
path = window.Ionic.WebView.convertFileSrc(path);
fetch(path)
```
getting error 404.
I was able to retrieve the file when using `"http://localhost/" + relativePath` which is weird and a terrible workaround...

This is a spin off of #380

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.