Reputation: 779
I have all my user uploaded pictures in a directory outside of the public root directory of my website. I need to dynamically pull pictures from this directory using javascript, but I cannot obviously since the user only sees the public directory. I have been stuck on this for a while and I cannot think of a solution. I heard that jQuery.load() may come into use, but I'm not sure how to utilize that. Any tips would be awesome.
~Thanks
Upvotes: 1
Views: 155
Reputation: 2531
The only way to do this is to use server side code. Javascript is client side code and can't not access anything outside the server's html root directory.
Upvotes: 1