How to code URLs for static files in an additional directory #1764
-
In my system I have an existing directory My problem is that I'm generating URLs into that file tree which look right but don't display images. That directory is in the static paths: [
"/home/henry/gitr/pas/public",
"/d/u/PhotoIndex"
] ( The parts of the HTML which are supposed to display thumbnails of the images are like this:
.. but the images referenced by the "src" attribute are not being rendered. (BTW "view" is a route I've defined to display the full-resolution image in a separate window)) My understanding of the process for serving static files is that Mojo searches the paths in order for the URL supplied; but I've done something wrong, because the file referred to above (IMG_0113.JPG) most certainly exists:
I've tried coding a absolute URL but relative to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If your static path is |
Beta Was this translation helpful? Give feedback.
-
D'you know what ... I thought I'd tried that. But plainly I hadn't, because it works fine. Thank you. |
Beta Was this translation helpful? Give feedback.
If your static path is
/d/u/PhotoIndex
then the URL to/d/u/PhotoIndex/2016/10/2016_10_05 Northumberland/IMG_0113.JPG
would be/2016/10/2016_10_05 Northumberland/IMG_0113.JPG
.