Irlanco
Irlanco

Reputation: 779

Dynamically loading pictures from directory outside of site root directory

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

Answers (1)

Jason Foglia
Jason Foglia

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

Related Questions