Hello I have a colleague at École Polytechnique de Montréal who would like to call a static script from the files library, which calls static images but it doesn’t seem to work. Can anyone point us to the right documentation or experimentation results?
Hello,
I would like to know if there is an equivalent to “/static/myimage.jpg” to call dynamically from a javascript script a file in the file bank of a course site on EDUlib.
Writing
<img src="/static/myimage.jpg">
in an html block will work.
Writing<script src="/static/myscript.js">
will also work but if the code in myscript.js tries to call “xyz.setAttribute(‘poster’, ‘/static/myimage.jpg’)” it does not work, the link is not formed correctly. I’m looking for a way to solve this without having to rebuild the url with regular expressions or absolute links but I don’t know how to do it. Do you know if open edx has foreseen this kind of use case?Thanks