title: How to prevent users from accessing files on server?
body: <p>I have an application that let users to upload files to server. All files are stored in one directory called <code>Uploaded Files</code> (which has <code>Thumbnails</code> directory inside).</p>
  
  <p>What are the most common ways for preventing users to see these files ? I mean I don't want users to see the files by typing URL like <code>/path_to_website/Uploaded Files/1.png</code>.</p>
  
  <p>On the other side, authorized users should be able to see the files by getting a page that contains paths to files, like: <code>../Uploaded Files/1.JPG</code>, <code>../Uploaded Files/2.png</code>, <code>../Uploaded Files/3.gif</code>. These users should be able to see only the files that appear on the page they got, i.e. I want to prevent them to see <code>../Uploaded Files/823.gif</code> for example.</p>
  
  <p>Please help to understand how this kind of things are done these days.</p>
  
  <p>Thanks a lot !!</p>