By volunteermama on
is there an update to this solution to the private/public files problem? http://drupal.org/node/116843
i'm trying to figure out how to make files private on my site... and i'm hosted on 1and1.com and i dont think i can make my files folder "above" my public accessible web root.
can someone point me in the current best solution for making files that need to be private private and files that can be public public? i'll settle for all files private if i have to.
Comments
...
Let's start by describing one common method:
When a file is attached to a node which isn't accessible to a user, the user won't be able to download the file. You must set your filesystem to 'private' to enforce this.
But here is a more general description of how downloading works in Drupal:
When a user asks to download a file, Drupal asks all modules "should I let him download the file?" If, and only if, at least one module says "sure!" and no module says "no!" then download is possible. That's how things go when filesystem is set to 'private'.
You probabaly can. And if you can't, you simply need to put "deny from all" in your dot-htaccess (the one in the 'files/' folder). This will make it impossible to download files unless through Drupal.
thank you ! I'll try the
thank you ! I'll try the htaccess . :)