regnete commented on issue #1329:
URL:
https://github.com/apache/cordova-android/issues/1329#issuecomment-924648282
Facing similiar issue when using an absolute file url:
```javascript
lFileUrl =
'file:///data/user/0/com.company.stub/files/myfolder/IMG-20210826-204423558thumb.jpg'
xhr.open("GET", lFileUrl, true);
xhr.onload = function() {
console.log('loaded');
}
try {
xhr.send();
} catch (e) {
console.error(e);
}
```
Error message on console:
`Not allowed to load local resource:
file:///data/user/0/com.company.stub/files/myfolder/IMG-20210826-204423558thumb.jpg`
Solution could be to provide something similar to
`window.WkWebView.convertFilePath('your/file/path');` from `cordova-ios`.
see
https://github.com/apache/cordova-ios/blob/715c2dbfb273fb33721e8cf3f989ce7b20892d32/cordova-js-src/plugin/ios/wkwebkit.js#L28
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]