Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Access HTMLResources package files for specific article

Avatar

Level 2

Hello,

The task is to load JSON file which is included into HTMLResources package using JavaScript. OTB Cordova File Access plugin gives this possibility but there is non-trivial issue how to define the path to HTMLResources folder for a specific article.

For example, when debugging an article in Chrome Developer Tools we can see the next paths:

Article path - file:///storage/sdcard0/Android/data/com.adobe.dps.preflight/files/8b4e9a0c-43b8-4b28-8cf5-de45b9df6a8a/AwesomeArticle.html

HTMLResources path - file:///storage/sdcard0/Android/data/com.adobe.dps.preflight/files/HTMLResources

However, there is no such folder like file:///storage/sdcard0/Android/data/com.adobe.dps.preflight/files/HTMLResources on the file system and File Access plugin can not reach it.

If we perform some search then we can find HTMLResources content somewhere under file:///storage/sdcard0/Android/data/com.adobe.dps.preflight/files/fb30c87b-65fa-444f-a448-2f810f3a8b01

So, HTMLResources folder UID is different to article folder UID and article metadata (cq.mobile.context.entity) does not contain any pointers to that folder.

Is it possible to obtain HTMLResources folder UID from JavaScript context? Is there any other possibility to access its content?

Any input would be appreciated.

0 Replies

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now