I am using java version of CKFinder. is there anyway to overwrite the constant of Constants.java
ex:. I want to overwrite the value of public static final String INVALID_FILE_NAME_REGEX = "\\p{Cntrl}|[/\\:\\*\\?\"\\<\\>\\|]";
ex:. I want to overwrite the value of public static final String INVALID_FILE_NAME_REGEX = "\\p{Cntrl}|[/\\:\\*\\?\"\\<\\>\\|]";
Re: How to overwrite the constant?
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: How to overwrite the constant?
Once a final variable has been assigned, it always contains the same value. If a final variable holds a reference to an object (not primitive type), then the state of the object may be changed by operations on the object, but the variable will always refer to the same object.
For example:
You can change elements of array but you can't change array (trying to allocate new array will throw an error.)
On the other hand:
String is immutable; there isn't any method that would change the value without creating new object.
In the above example this new object is assigned to "s" which is not allowed because it would result in changing the reference.
--------
Having said all the above you can:
1. Change value of INVALID_FILE_NAME_REGEX in Constans.java, compile it and use it.
2. If you want to change this value at runtime I think that the best way would be changing this field type from String to StringBuffer. Changing the type will probably require changing code in few other places where this variable is used.
Overwrite file with Classic ASP
Hi,
How can i change the code on Classic ASP to overwrite exsiting file with the same name?
I am currently usingthe latest version of CKFinder with Classic ASP.
Kind regards,
Alejandro Genesio