Image Path?
Question:
The filename inserted into access has no path info...eg ants.jpg gets uploaded to images/ants.jpg, but the entry in my access database is ants.jpg.
When i try to show any of these on a page, i get a broken link because the image cant be found.
Answer:
Just hardcode the path into your image tags:
<img src="/images/<%=(myRS.Fields.Item("filename").Value) %>" >
You can also do that in UD as follows:
- Select the image tag.
- Choose browse to search for an image
- Choose Data Sources
- Select your database field - you will get: <%=(myRS.Fields.Item("filename").Value) %>
- add in front, the path: /images/<%=(myRS.Fields.Item("filename").Value) %>
Done.
This way you don't need to store the path in the database.
In the next version of Pure Upload there will be a possibility to store the path also in the database.
Comments
Be the first to write a comment
You must me logged in to write a comment.