By Anonymous (not verified) on
I'm setting up a site with one public and one private section.
My registered users must be able to upload files that are available only to other registered users so I'm using the private file system option. But at the same time, my users need to be able to upload images for use in public pages and stories, and those images must be accessible for anonymous visitors.
I'm kinda stuck and don't really know how to do it.
FTP'ing to different folders is not an option since my users are not very technical. It has to be done in a relatively simple manner via the drupal interface somehow.
I'm running D6.2.
Please help!
Thanks
/luddet
Comments
Are you running apache?
If you have apache running, you can set up public file access, but .htaccess protect the private file directories. In public mode, Drupal lets apache serve the files, so apache is the boss :)
Just separate the upload directories, images are (?) IMCE to one area, file attachments to another.
Should work, but test on a devel server first.
PS: Interested in other approaches myself. Idea's anyone?
Alan Davison
www.caignwebs.com.au
Alan Davison
Problem solved (kind of)
Thanks,
I set it up using private download method and IMCE.
I created this file structure
This means that the files that are attached to nodes will go into the files directory and is protected by the deny directive in the .htaccess file.
Then I set up the profiles in IMCE to have the sites/default/files/public_files as base folder and put an .htaccess file there with "allow from all" in it.
So far it seems to work.
cheers
/luddet
New module
I made a similar solution for a customer a while ago. I just uploaded it as a module here.
Thomas (Webbredaktören)