androidcordovaionic-frameworkionic4ionic-webview

@ionic/angular 4.0.0-beta.13 : Not allowed to load local resource : with webview 2.2.3 - Ionic CLI 4.3.1


After taking the photo from camera, these paths come.

file:///data/data/xxx.xxx.xxx.xxx/files/1542782360167.jpg

I use Ionic 4 in which WebView is 2.2.3, all types of replies have been observed by applying but no effects came.

"cordova-plugin-ionic-webview": "2.2.3"

I used to answer this one

Not allowed to load local resource: ionic 3 android

So I do not show the application on the device and this one is not the same.

Failed to load resource: net::ERR_FILE_NOT_FOUND

Solution

  • I have found the solution of my problem.

    I have done this link which is working perfectly.

    https://devdactic.com/ionic-4-image-upload-storage/

    And in my config.xml, extra did not write anything.

    inshort : new webview plugin are not support file:/// url

    first convert url into http://localhost:<post>/url using this function this.webview.convertFileSrc(img);

    return this function value like this http://localhost:8080/_file_/data/data/xxx.xxx.xxx.xxx/files/1542782360167.jpg

    my suggestion use above link for same kind of problem...