What URL to code for an image in "public" #1634
-
|
My source tree looks (in part) like this: MyApp
+--bin
+--myapp.pl
+--public
+--photos
+--Sam
+--somephoto.jpg
I can't find out how to code the Pasting What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
|
What do you get when you run |
Beta Was this translation helpful? Give feedback.
-
|
Short answer: Long answer: There are three kinds of URLs, absolute, host-relative, and page-relative. You have provided a page-relative URL, so the browser will construct the URL to request depending on the current page path it's on. You want a host-relative URL which starts with a slash, so the browser will request it relative to the root of your application. |
Beta Was this translation helpful? Give feedback.
What do you get when you run
perl bin/myapp.pl eval -V 'app->static->paths'?