Click here to Skip to main content
15,888,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

so i am working on a project where i am implementing Simogeo Filemanager.

Does anyone have any experience with this system, i could need a litle bit support here.

My first problem here is i dont realy know how to pass a file path where i want to upload my files. It aways using the default /inc/lib/filemanager/userfiles/.

I hope there are some Simogeo experts here.
Posted

1 solution

Hello,

What you want is done by changing the appropriate options in configuration file (filemanager.config.js). Here is how you can specify a different folder located under serverRoot.
"serverRoot": true,
"fileRoot": "myapp/documents/",

If you want to use a folder not located under the serverRoot then
"serverRoot": false,
"fileRoot": "/home/secret/docs/",

Note: Make sure that the server user has appropriate read/write permissions to this folder.

If you want to do dynamically via php code then you can do it following way
PHP
$fPath = '/home/secret/docs/';
$fm = new Filemanager();
$fm->setFileRoot($fPath);

Regards,
 
Share this answer
 
v3
Comments
T0mii 29-May-13 7:27am    
oh i see, i guess this is the way to go.
Now the thing is im building this filemanager into a freamwork. Is there a way to do this root folder changes on the php side?

I wrote a class where i can give a path and a root directory,

and then just

$fm = new FW_HTML_Filemanager('/path/to_directory/')

echo $fm->build()

and this will call the filemanager.
Prasad Khandekar 29-May-13 7:39am    
I have updated the solution to reflect this.
T0mii 3-Jun-13 5:40am    
Hello Sir,

i didnt found a way to personal message you, so i just use this inappropriate way to ask for some help/suggestions.

may you want to take a look at my problem, if you have the time for it.

http://www.codeproject.com/Questions/601812/SimogeoplusFilemanagerplussetFileRootpluswithplusc

best regards
Tom
T0mii 29-May-13 7:40am    
Thanks a lot for the fast and great answer!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900