${file:isOpenFileAllowed()}

Determines if local file opening is allowed.

Uses reflection to avoid hard dependency on semanticcms-openfile-servlet.

OpenFile must be explicitly enabled by setting the com.semanticcms.openfile.servlet.OpenFile.enabled context parameter to true.

For security, OpenFile may only be called from localhost. However, be careful when behind a proxy, as external proxied requests can appear to come from localhost.

OpenFile may be enabled for development but disabled in production by selectively including the semanticcms-openfile-servlet dependency by profile. By not including the dependency in production builds, the code is not simply disabled, but is not even included in production.

Example

${file:isOpenFileAllowed()}

Function Information

Function Class: com.semanticcms.file.taglib.Functions
Function Signature: boolean isOpenFileAllowed()
Display Name: None