Skip to content Skip to sidebar Skip to footer

@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

Solution 1:

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...

Solution 2:

Please try add this to your config.xml:

<accessallows-arbitrary-loads-for-media="true"allows-arbitrary-loads-in-web-content="true"allows-local-networking="true"origin="*"/><allow-navigationhref="data:*"/><allow-navigationhref="*"/>

Post a Comment for "@ionic/angular 4.0.0-beta.13 : Not Allowed To Load Local Resource : With Webview 2.2.3 - Ionic Cli 4.3.1"