Hi !
I created a File column in my db for an image. I store the files in a root dir called 'pics'. When I add a link, the image uploads ok, as well as the view and download commands when I check what has been stored.
Now, I want to Insert this image in my template, I write :
<% if Image%>
<img src="<%Image%>">
<%endif%>
and when I view the source of this html page, <%Image%> is equal to flag.jpg which is my image. So I tried
<% if Image%>
<img src="<%build_root_url%>/pics/<%Image%>">
<%endif%>
And I find out flag.jpg has been stored by links SQL in a new folder called '1' inside '/pics' and the image url now is equal to
http://mysite.com/pics/1/1-flag.jpg
How can I insert this image in a template ? Is there a way to get to this new path/url ?
Thanks.
Mitia
I created a File column in my db for an image. I store the files in a root dir called 'pics'. When I add a link, the image uploads ok, as well as the view and download commands when I check what has been stored.
Now, I want to Insert this image in my template, I write :
<% if Image%>
<img src="<%Image%>">
<%endif%>
and when I view the source of this html page, <%Image%> is equal to flag.jpg which is my image. So I tried
<% if Image%>
<img src="<%build_root_url%>/pics/<%Image%>">
<%endif%>
And I find out flag.jpg has been stored by links SQL in a new folder called '1' inside '/pics' and the image url now is equal to
http://mysite.com/pics/1/1-flag.jpg
How can I insert this image in a template ? Is there a way to get to this new path/url ?
Thanks.
Mitia