Hacker News new | ask | show | jobs
by torstenvl 1596 days ago
..... are they not portable otherwise? Are there platforms that can read an image format in embedded base64 but can't read it from a separate file?
1 comments

If you follow Google's official recommendations as to how file system access is supposed to work on Android, you can't resolve any relative paths with regards to files received from other apps.

So if you're e.g. using a file explorer (one app) to browse through your storage and then open an HTML file in a browser (a different app), then the browser is officially unable to resolve any relative paths in that HTML files, so no images, no links, no style sheets, no scripts, no nothing.

If you Save a page via your browser, it[1] creates the .html file, plus a sub-folder of the same name with all the assets in. The html gets re-written to reflect the new file paths.

---

[1] In Chrome, IE, an Edge definitely. Not sure about Firefox or Safari.

Yes, but if you then copy the result of that onto your Android phone, you still end up with the issue I described above.

> Not sure about Firefox

It does that, too.