Advanced Designer Learning Path is now live! Read More

Importing resources to a webapp

Level 1
Importing resources to a webapp

Hi,

My objective is to create a Simple HTML/JS webapp that has multiple HTML/CSS/JS files. I tried creating a resource folder under the plugin as follows '/plugins/<pluginid>/resource/<htmlfile>' and DSS was not able to reference that resource. 

On the other hand, when I place the resources under /local/static and reference them, it works just fine. Anything that I am doing wrong?

0 Kudos
4 Replies
Dataiker
Dataiker

Hi,
The resource folder is located at 'plugins/dev/plugin-id/resource' or 'plugins/installed/plugin-id/resource' depending on whether it is a dev or an installed plugin (in your case it's a dev plugin), but to reference it you should use 'plugins/plugin-id/resource'.
Maybe it was the issue. Let me know

0 Kudos
Level 1
Author

Thank you for the response.

I tried both. the /dev/ and the /installed/ as part of the locator /plugins/dev/<pluginid>/resource/<filename>

None of that worked. I am not sure if it is a problem with my dss instance or if there is s config issue.

0 Kudos
Dataiker
Dataiker

What if you try as reference path: "../../resource/PATH_TO_HTML" ?

0 Kudos
Level 1
Author

Still nothing. 

I tried accessing the body.html via http://localhost:11200/plugins/<pluginid>/<webappid>/body.html and it showed page not found. If I am not wrong, this should definitely return body.html, but it doesn't 

0 Kudos
A banner prompting to get Dataiku DSS