Importing resources to a webapp

vishet
vishet Registered Posts: 17 ✭✭✭✭

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?

Best Answers

  • StanG
    StanG Dataiker, Registered Posts: 52 Dataiker
    Answer ✓

    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

  • StanG
    StanG Dataiker, Registered Posts: 52 Dataiker
    Answer ✓

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

Answers

Setup Info
    Tags
      Help me…