1

Topic: Change rootpath with javascript

Hello guys,
i use MCFileManager with TINYMCE (.NET version) for a multiple users application.

I want every user to upload his stuff at his own folder (ex. user "Jim" should upload his photo at "Jim" folder etc)

I try to change the rootpath value from javascript, but this doesnt work.
The MCFileManager always gets the rootpath value from Web.config file.

Can you help me please.

2

Re: Change rootpath with javascript

You can override the root path using session variables. Like Session["filemanager.filesystem.rootpath"] = userDir; I think this is the best option in your case.

Best regards,
Spocke - Main developer of TinyMCE

3

Re: Change rootpath with javascript

Spocke,
this doesn't seems to work.

I have already include this code:
Session["filemanager.filesystem.rootpath"] = userDir;
in my js code but it doesnt work.

I am not sure if i can edit a session value (server side) from js code (client side).

Is there any other proposal for my issue ?

Thank you

4

Re: Change rootpath with javascript

On the server not the client side. In an aspx file or similar.

Best regards,
Spocke - Main developer of TinyMCE

5

Re: Change rootpath with javascript

Unfortunately the problem still exists.

There is no way to override web.config's "filesystem.rootpath" key by adding Session["filemanager.filesystem.rootpath"] variable.

MCfilemanager always gets rootpath value that exists in web.config file.

I use VB ASP.NET 2.0.
I set Session("filemanager.filesystem.rootpath") = "../clients/" at the Page_Load function of my aspx file (that includes tinymce editor with MCfilemanager).

I think everything is fine.

Is something i miss?

6

Re: Change rootpath with javascript

Solved!

Authentication required:
(web.config file)
<!-- Authentication -->
<add key="authenticator" value="SessionAuthenticator" />
<add key="authenticator.login_page" value="login_session_auth.aspx" />
<add key="authenticator.allow_override" value="*" />

7

Re: Change rootpath with javascript

Yes, need the session auth to override the config options like that.

Afraithe
TinyMCE Developer
Moxiecode Systems