Bug? Webview - HTML access to files in subdirectory

Jack Cole

Well-Known Member
Licensed User
Longtime User
In the past, I was able to run HTML5/JS apps in a webview with b4a from the assets folder. At some point, it appears that a change was made that makes it where the HTML cannot access files in subdirectories of the assets folder. Seems like this might have been around the time when file groups were added, but I'm not sure about that. I am aware of workarounds for this, but these are less than ideal for large apps (3000+ files that would need to be unzipped into the internal files folder).

Is this a bug or intended for some reason? This is not backwards compatible with large projects that I have.

See attached example. I have just a simple HTML page that tries to load an image from a subdirectory (doesn't work).
 

Attachments

  • html5wrapper.zip
    7.1 KB · Views: 310

Erel

B4X founder
Staff member
Licensed User
Longtime User

Jack Cole

Well-Known Member
Licensed User
Longtime User
It is not very practical to do this with my apps. This is a massive number of file references. Also, this applies to any external js files loaded. If there is a way to fix this on your end, it will probably save you future support problems. Unless you just recommend never using HTML from assets. Still, this would be not optimal if a fix is possible.
 
Top