You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using image files saved via Filesystem as img src attributes is not possible. Following the documentation simply results in a "404 (OK)" error, and no file loads. Logcat also states: Capacitor: Unable to open asset URL: http://localhost/_capacitor_file_/DOCUMENTS/myFile.png
I have verified that the file is saved using file system, i can read it back. I simply cannot use convertFileSrc. Based on errors, it is doing the thing the docs says it does: "must be rewritten as http://localhost/_capacitor_file_/path/to/device/file before being used in the Web View.". The failed request is in that format.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
Platform(s)
Android
Current Behavior
Using image files saved via Filesystem as img src attributes is not possible. Following the documentation simply results in a "404 (OK)" error, and no file loads. Logcat also states:
Capacitor: Unable to open asset URL: http://localhost/_capacitor_file_/DOCUMENTS/myFile.png
Expected Behavior
I should be able to use image files I've saved as img src per the documentation
Code Reproduction
https://github.com/roblouie/file-src-broken
Other Technical Details
I have verified that the file is saved using file system, i can read it back. I simply cannot use convertFileSrc. Based on errors, it is doing the thing the docs says it does: "must be rewritten as http://localhost/_capacitor_file_/path/to/device/file before being used in the Web View.". The failed request is in that format.
npm --version
: 6.14.4node --version
: v13.12.0pod --version
(iOS issues only):Additional Context
There's an open issue here with discussion: ionic-team/cordova-plugin-ionic-webview#380
Nothing really seemed to help me there though.
The text was updated successfully, but these errors were encountered: