Closed (fixed)
Project:
IMCE
Version:
6.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2008 at 21:52 UTC
Updated:
3 Apr 2010 at 13:00 UTC
I need to have my file attachments set to private, however, I want some files to be available publicly. I've set my file attachments to private, and want to have the editor attachments public. So, they will need to go into a different directory. How can I change the default directory for ICME so that the files do not go into the system directory?
Thanks!
k
Comments
Comment #1
StevenWill commentedI also need to be able to have the directory be different than the system directory for a specific user. I noticed on line 40 of core_profiles.inc the profile is set for directories. Anyone know what edit is needed.
Steve
Comment #2
TechMosaic commentedI just want to lend my support for this idea.
I don't need it for security per se, but I would love to be able to point to a folder on my web server other than one in the drupal default files folder.
Could the directory setup give you the option to add a directory using a ../newfolder so it looks to the root, or a http://www.mysite.com/newfolder so it uses a FQDN to view a folder, as long as the folder is not protected via an htaccess or other security method??
I see that PHP: can be used there. Maybe there is a hack for folks like me who just want flexibility with folder structures, and don't care about the security issues...I just don't know php well enough to figure out what that should be.
Comment #3
hansamurai commentedI am also really interested in something like this. I would even be useful if someone could help me hack the code if they don't want to add this to the mainline.
Update: I was able to hack away at page.inc by replacing all references to "file_directory_path()" with a string reference to my intended path. This is working so far.
Comment #4
ufku commenteduse hook_init to change the value of
$GLOBALS['conf']['file_directory_path']
Comment #5
hansamurai commentedDoes that change it permanently or just locally?
Comment #6
ufku commentedThe change is specific to current request.
It can be made specific to imce path
This should also work in template.php without a hook_init