Feng Forum
Other Topics => Development => Community Contributions => : nuttynibbles May 29, 2010, 05:33:17 PM
-
hi,
i understand the upload directory is in the main. but how do i change this to somewhere else in the same server?
thanks.
-
Using Linux links could be a way
-
is there anywhere in the configuration which I can hack?
-
Not in configuration.
Repository path is set in the constructor of the class FileRepository_Backend_FileSystem.
You should hack everywhere this class is instantiated (search for "FileRepository_Backend_FileSystem" in the code) ... At your own risk :)
-
Hi cabeza,
tks for the info. will be working on it =)
regards,
christopher
-
It would be nice if you could post how you did it, for future reference,.
-
the express way:
open /config/config.php
add:
define( 'MY_OWN_UPLOAD_DIR' , 'my/own/dir' );
open lib/filerepository/backend/FileRepository_Backend_FileSystem.class.php
find function getRepositoryDir and setRepositoryDir, then change to:
function getRepositoryDir() {
//return $this->repository_dir;
return MY_OWN_UPLOAD_DIR;
}
function setRepositoryDir($value) {
if(!is_null($value) && !is_dir($value)) {
throw new DirDnxError($value);
} // if
/*if(!folder_is_writable($value)) {
throw new DirNotWritableError($value);
} // if*/
//$this->repository_dir = $value;
$this->repository_dir =MY_OWN_UPLOAD_DIR;
} // setRepositoryDir