SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru johnjohn2's Avatar
    Join Date
    Apr 2004
    Location
    here
    Posts
    746
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    best place for storing image uploads

    Is there a way to lock down a directory of a file upload directory so that users can't just type in the directory in their browser(to that folder) and guess file names? I guess what I'm asking is what is the best structure to setup when dealing with file uploads that may be confidential?

  2. #2
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    If you have the possibility to set options in a .htaccess file, this should work:

    Code:
    Order deny,allow
    Deny from all
    Yours, Erik.
    ERIK RIKLUND :: Yes, I've been gone quite a while.

  3. #3
    SitePoint Guru SteveO's Avatar
    Join Date
    Jan 2003
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can even store image files out of the web root so there is no possibility of people accessing them directly.

  4. #4
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In case you want to forbid only the directory listing, but still allow users to take files directly if they know the name, add "Options -Indexes" to htaccess or (much simpler) create an empty "index.html" files in this directory.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •