从相机拍完照片后,这些路径就出现了。
file:///data/data/xxx.xxx.xxx.xxx/files/1542782360167.jpg
我使用的是Ionic 4,其中WebView是2.2.3,通过应用观察到所有类型的回复,但没有效果。
"cordova-plugin-ionic-webview": "2.2.3"
我曾经回答过这个问题
不允许加载本地资源:ionic 3 android https://stackoverflow.com/questions/52055126/not-allowed-to-load-local-resource-ionic-3-android/52590478#52590478
所以我没有在设备上显示该应用程序,而这个应用程序不一样。
Failed to load resource: net::ERR_FILE_NOT_FOUND
我已经找到了我的问题的解决方案。
我已经完成了这个链接,它工作得很好。
https://devdactic.com/ionic-4-image-upload-storage/ https://devdactic.com/ionic-4-image-upload-storage/
而在我的config.xml中,extra没有写任何东西。
简而言之 :
不支持新的 webview 插件file:/// url
首先转换url
into http://localhost:<post>/url
使用这个功能this.webview.convertFileSrc(img);
像这样返回这个函数值http://localhost:8080/_file_/data/data/xxx.xxx.xxx.xxx/files/1542782360167.jpg
我的建议是使用上面的链接来解决同类问题...
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)