File Database¶
The File Database manages binary files, assigning each file a globally unique identifier (GUID) at the domain level. Files are uploaded via the File control (UI) or the $Files
scripting object.
File Access¶
Files are accessed using their GUID in a URL of the form: http(s)://mydomain.emakin.com/file/<fileId>
. This URL is accessible even anonymously.
Info
The GUIDs generated by the system are cryptographically secure, eliminating the need for additional security measures in most scenarios. However, for enhanced security posture, administrators can implement IP address restrictions at the domain level to further control access.
File Revisions¶
Each file update creates a new revision with a new GUID. Upon revision completion, the new file content replaces the old, maintaining the original file's GUID. The UI handles updates automatically; scripting requires the Files.Replace method.
File Editor Integration¶
Emakin supports the Web Application Open Platform Interface (WOPI) protocol for seamless integration with various file editors. When a user opens a file through the UI, the system intelligently determines whether a compatible WOPI-based editor is available for the file type. If an appropriate editor exists, the file opens directly within the editor for in-browser editing and viewing. Otherwise, the file is downloaded to the user's local machine for editing using locally installed applications.
File Templates¶
The File control supports file templates. A list of templates (from a database query or static list) can be specified as data sources. Selecting a template creates a copy with a new GUID, allowing download, upload, and editing (via the file editor if supported).
Beyond standard file upload and download operations, the Emakin File control incorporates the file template feature. This allows administrators to predefine a set of file templates, providing users with ready-made file structures or content. These templates are listed in the File control's data sources, which can be populated dynamically from a database query or defined as a static list.
Selecting a template creates a new file based on the template, assigning it a unique GUID. This new file can then be downloaded, uploaded, or edited using the file editor if a compatible editor is available for its type. This feature significantly streamlines workflows by providing pre-configured starting points for common file types.