Topics on this page:
The site-wide file root is the top of the directory structure for files you upload. By default it is the same as the LabKey Server installation directory, but you may choose to place it elsewhere if required for backup or permissions reasons.
During server setup, a directory structure is created mirroring the structure of your LabKey Server projects and folders. Each project or folder is a directory containing a "@files" subdirectory.
You can specify a site-wide file root at installation or to access the "Configure File System Access" page on an existing installation.
When you change the site-wide file root for an existing installation, files located under that site-wide file root will be automatically moved to the new location. The server will also update paths in the database for all of the core tables. If you are storing file paths in tables managed by custom modules, the custom module will need register an instance of org.labkey.api.files.FileListener with org.labkey.api.files.FileContenService.addFileListener(), and fix up the paths stored in the database when its fileMoved() method.
Files located in projects that use pipeline overrides or set their own project-level file roots will not be moved. Please see Troubleshoot File Roots and Pipeline Overrides for more information.
You can override the site-wide root on a project-by-project basis. A few reasons you might wish to do so:
You can also see or set the project-level file root by selecting (Admin) > Folder > Management and opening the Files tab.
The directory exposed by the Files web part can be set to any of the following directories:
Administrators can enable an alternative WebDAV root for the whole server. This alternative webdav root, named "_webfiles", displays a simplified, file-sharing oriented tree that omits non-file content (like wikis), and collapses @file nodes into the root of the container’s node.
To access or mount this root go to a URL like the following (replacing my.labkeyserver.com with your real server domains):
This URL will expose the server's built-in WebDAV UI. 3rd party WebDAV clients can mount the above URL just like they can mount the default _webdav root.
To enable this alternative webdav root:
The _webfiles directory is parallel to the default _webdav directory, but only lists the contents under @files and its child containers. @pipeline, @filesets, @cloud and @wiki contents are not accessible from _webfiles.
Any name collisions between between containers and file system directories will be handled as follows:
Child containers that share names (case-insensitive) with file system directories will take precedence and be displayed with their names unchanged in the WebDAV tree. File system directories will be exposed with a “ (files)” suffix. If there are further conflicts, we will append “2”, “3”, etc until we find an unused name. Creating a subdirectory via WebDav always create a child file directory, never a child container.
Named file sets are additional file stores for a LabKey web folder. They exist alongside the default file root for a web folder, enabling web sharing of files in directories that do not correspond exactly to LabKey containers. You can add multiple named file sets for a given LabKey web folder, displaying each in its own web part. The server considers named file sets as "non-managed" files systems, so moving either the site or the folder file root does not have any effect on named file sets. File sets are a single directory and do not include any subdirectories.
To add a named file root:
For details on URL parameters used with named file sets, see Controlling File Display via the URL.
For details on displaying a named file set using the JavaScript API, see JavaScript API - Samples.
You can view an overview of settings and full paths from the "Summary View for File Directories" section of the "Configure File System Access" page that is available through (Admin) > Site > Admin Console > Admin Console Links > Configuration > Files. A screenshot:
File directories, named file sets and pipeline directories can be viewed on a project/folder basis through the "Summary View." The 'Default' column indicates whether the directory is derived from the site-level file root or has been overriden. To view or manage files in a directory, double click on a row or click on the 'Browse Selected' button. To configure an @file or an @pipeline directory, select the directory and click on the 'Configure Selected' button in the toolbar.
Note that a @pipeline marker is used in the "Summary View for File Directories", available through (Admin) > Site > Admin Console > Admin Console Links > Configuration > Files. However, there is no corresponding @pipeline directory on the file system. The summary view uses the @pipeline marker simply to show the path for the associated pipeline.