Writes a link to a file. Supports optional desktop integration mode.
is enabled, the connection is from localhost, and not exporting,
file:///… URL to the file so that it may be opened locally by the browser.
If there is no body, will write the filename followed by the file size.
must be explicitly enabled by setting the
context parameter to
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.
The onclick AJAX file opening is disabled when the documents are exporting,
as set by the
X-com-semanticcms-core-exporting: true header.
The id used in URL anchors. If not provided, is generated from the label. Must be unique per page. Ids generated from labels will be unique, but may change as page structure changes.
The book containing the file. Defaults to the book of the current JSP file.
The page-relative path to the file.