Relative path for uploaded Javascript files

I have some files uploaded as GenericFiles using the media manager. They are Javascript and Font files.

However when I try to include them in embedded HTML I can’t figure out how to reference them. I’ve tried using relative paths, the original file names, and the files as they are saved renamed with the file ID.

For example I have card-depth.js uploaded to the server via the media manager. I’ve tried referencing it in the following ways:

<script src="card-depth.js"></script>
<script src="./card-depth.js"></script>
<script src="28.js"></script>
<script src="./28.js"></script>

I know these are not found as when I click Preview Layout after including them, my Chrome dev console reports that is 404.

How do I reference the files I upload using the media manager in embedded HTML?

1 Like