Hi,
anyone know a way to setup CKFinder runtime in Java/JSP page?
by PHP it's possbile to setup some properties by session attributes.
I need to set baseDir and basePath runtime to allow access by the users to some folder and not to other.
At the moment I have in session only the attribute CKFinder_UserRole, there is a way to set another attibute??
Thanks.
anyone know a way to setup CKFinder runtime in Java/JSP page?
by PHP it's possbile to setup some properties by session attributes.
I need to set baseDir and basePath runtime to allow access by the users to some folder and not to other.
At the moment I have in session only the attribute CKFinder_UserRole, there is a way to set another attibute??
Thanks.
Re: CKFinder setup Java/JSP
You can write a class that will set dynamically baseDir / baseUrl to any value you need.
You can find more details in the documentation.
Let me know if you have any specific questions.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: CKFinder setup Java/JSP
I write a class that extends DefaultPathBuilder to override getBaseDir and getBaseUrl method but the compiler return a n error on getBaseUrl because not override or implement a method from a supertype.
any suggestion?
After I try to setup the url with a class that extends Configuration class, but in this way how can I access to session variable through ServeltConfig session?
Thanks
Re: CKFinder setup Java/JSP
Sorry I made a mistake with name of method.
Now my class (that extendes DefaultPathBuilder) works fine, but I have another questions:
when I use my class to set dinamically baseDir/baseUrl the parameter in the config.xml (baseDir/baseURL) are ignored. If I don't set this string in my class the finder set the default folder ("userfiles").
If i want use the xml parameter when session not have variable to set basedir and baseurl how can i do?
The code below instead of set the value in the xml file, set the default value though I don't set any string.
Re: CKFinder setup Java/JSP
In http://docs.cksource.com/CKFinder_2.x/D ... /Extending
check out the Creating a Custom PathBuilder Class section.
com.ckfinder.connector.configuration.DefaultPathBuilder creates baseUrl and baseDir with its default value – /userfiles/ dir.
If you want to read values form config.xml extend com.ckfinder.connector.configuration.ConfigurationPathBuilder class.