www.dextsolution.com
DEXTUPLOAD
JK
menu toggleReference > dextuploadjk > engine > NamingRules

dextuploadjk.engine
Enum NamingRules

Minimum version
1.0.0
Minimum environment
Java 17, Jakarta EE 9+
Description

This indicates a method of checking whether the file name of a file is in a valid format that can be used in the file system.

ConstantDescription
None This is the default value, and the validity of the file name is not checked.
Windows (Recommended) Check whether it contains characters that cannot be used in the Windows file system, and also check whether the file name matches a pre-reserved keyword.
UnixNLinux Checks whether characters that cannot be used in Unix or Linux file systems are included. In Unix and Linux, most characters except directory separator characters can be used in file names.
RestrictedUnixNLinux It follows UnixNLinux rules, but does not allow file names (except reserved words) that cannot be used on Windows OS.
# When setting directly to the Environment object
Environment env = new Environment();
env.setLimitFilenameRule(NamingRules.Windows);

# When setting in Spring's DispatcherServlet context XML
<property name="limitFilenameRule" value="Windows"/>

# When set with the JKExtensionUploadFilter or JKSpringExtensionUploadFilter parameter
<init-param>
  <param-name>limitFilenameRule</param-name>
  <param-value>Windows</param-value>
</init-param>