How to get file from local assets dir on native device?

With ionic 3 it was possible to access local assets via angular http client by using: ${location.protocol}//${location.host}/assets/

e.g:
capacitor://localhost/assets/locales/en_US.yaml

This seems to be no longer possible (on native device) with ionic 5. How can i read local assets on native device?

thnx in advance :slight_smile:

well, pebkac. there was a custom url validation in place, that did not accept urls to start with “capacitor://”. after fixing this, using “capacitor://localhost” works just fine^^

1 Like