You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

Filesystem

Structr can host files of any type. You can upload files through the UI via drag & drop, or connecting via (S)FTP/SSH (see SSH access, (S)FTP access and structr.conf for details).

Files are stored as binary objects in the file system, referenced by its UUID in Structr’s underlying graph database.

To link a <a>, <link>, <script> or <img> element in a page to a file, click the link icon (see Pages Tree View), choose the file in the file selector and set the src or href attribute to ${link.path} (see link Keyword).

Filesystem

Folder List Area

The Folder List Area on the left contains all folder elements in Structr as a list. A folder is a container for other folders and files. You can put a folder into another by drag and drop, creating a folder hiearchy or folder tree.

Folders can also be accessed, created, renamed and deleted through (S)FTP/SSH.

Folder Contents Area

The File Contents Area on the right displays all contents of the current folder. Subfolders are sorted to the top of the list. Files are displayed as a pageable list after the folders. To upload files, simply select and drag files from your operating system folder or desktop and drop them onto the file area. The files will be uploaded subsequently and stored in Structr.

Uniqueness

File/folder paths have to be unique by default, means that there must not exist two files or folders of the same name in the same folder.

Uploaded files with clashing filenames will be auto-renamed. The current date/time will be appended to the filename in order to allow users to upload clashing files. The postfix appended to the filename looks like this: _yyyy-MM-dd-HHmmss

There’s configuration switch to disable the uniqueness constraint globally:

application.filesystem.unique.paths = false

The path uniquess was introduced with commit 14cfe (28-DEC-2015).

Search results for "Filesystem"

Filesystem

application.filesystem.enabled Enables the creation of home directories for each users.
application.filesystem.unique.paths Enforces unique paths for files and folders.
application.filesystem.unique.insertionposition
startprefixes the name with a timestamp
beforeextensionputs the timestamp before the last dot (or at the end if the name does not contain a dot)
endappends the timestamp after the complete name
application.filesystem.checksums.default List of checksums to be calculated on file creation by default.
application.filesystem.indexing.enabled Globally enables indexing. Indexing can still be controlled on a file basis.
application.filesystem.indexing.maxsize Maximum size (MB) for a file to be indexed.
application.filesystem.limit Maximum number of words to be indexed per file.
application.filesystem.indexing.minlength Minimum length of words to be indexed.
application.filesystem.indexing.maxlength Maximum length of words to be indexed.
application.filesystem.mount.followsymlinks Enables support for symbolic links in mounted directories.
applications.uploads.folder Default path for files uploaded via the UploadServlet.

directFileImport

Imports files from a directory in the local filesystem. The files can either be copied or moved (i.e. deleted after copying into Structr), depending on the mode parameter. The existing parameter determines how Structr handles existing files in the Structr Filesystem. The index parameter allows you to enable or disable indexing for the imported files.

Deployment Format

folder / filedescription
componentsContains the shared components of the pages editor of Structr.
filesContains all files out of Sturctr’s virtual filesystem. Folders and files in the virtual filesystem are not being exported by default. If you want to include a folder or file into the export you have to set the flag includeInFrontendExport on each file or folder. Each file or folder will inherit this flag from its parent folder.
mail-templatesContains the mail-templates.
modulesContains the application configuration and definition of additional modules of Structr e.g. the flow engine.
pagesContains the created pages in the pages editor of Structr.
schemaContains the schema definition and code entered in the schema and code section of the Structr UI.
securityContains the resource access grants defined in the security section of the Structr UI.
templatesContains all template elements of the pages editor of Structr.
application-configuration-data.jsonContains the configured schema layouts of Structr’s schema editor.
components.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the components folder of the export.
deploy.confContains information about the Structr system that created the export of the application.
files.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the files folder of the export.
localizations.jsonContains the localizations that where created in the localizations section of the Structr UI and that can be used in server side scripting with the localize() function of Structr.
mail-templates.jsonContains the settings e.g. visiblity flags, locale or uuid for each file in the mail-templates folder of the export.
pages.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the pages folder of the export.
pre-deploy.confScript that is run before deployment import. Use this to create users who are granted access to nodes in the export files.
post-deploy.confScript that is run after deployment import. Can be used to start any tasks which are necessary after import.
sites.jsonContains sites that are configured in the pages section of the Structr UI.
templates.jsonContains the settings e.g. visiblity flags, contentType or uuid for each file in the templates folder of the export.
widget.jsonContains the widgets that were created in the pages section of the Structr UI.

IllegalStateException: URI has an authority component

2020-03-31 12:33:56.703 [qtp1327213994-88] WARN  org.eclipse.jetty.server.HttpChannel - /resources/script.js
java.lang.IllegalArgumentException: URI has an authority component
at java.base/sun.nio.fs.UnixUriUtils.fromUri(UnixUriUtils.java:53)
at java.base/sun.nio.fs.UnixFileSystemProvider.getPath(UnixFileSystemProvider.java:103)
at java.base/java.nio.file.Path.of(Path.java:203)
at java.base/java.nio.file.Paths.get(Paths.java:97)
at org.structr.web.entity.AbstractFile.defaultGetFileOnDisk(AbstractFile.java:257)
at org.structr.web.entity.Folder.getFileOnDisk(Folder.java:205)
at org.structr.dynamic.Folder.getFileOnDisk(Folder.java:95)

Deployment

The deployment section is an access point to maintenance functionality that can be used to deploy a new Structr application or export the currently deployed one. More precisely, structr allows to import and export both the application itself, as well as user data, from and to a local directory on the host system that runs Structr (not a directory on the user’s machine or in the Structr filesystem). This is usually the recommended way when an application is built with the help of a version-control tool like git or subversion.

User Interface

To manage the user interface, Structr provides a visual web application builder. With the builder, you can either import HTML application templates or individual pages from a URL, or create everything from scratch. The resources (like CSS files, Javascript files, or images etc.) are downloaded automatically and stored in the Structr Filesystem, protected by the same access control and authentication layers as the rest of the data.

The building blocks

  • data access via REST endpoints
  • integrated authentication and access control
  • a filesystem to store documents, images and resources
  • large scripting library
  • predefined object types to use and extend

Import Wizard

The import wizard can be found in the Files section, because it is based on files in Structr Filesystem. This means that you need to upload the CSV file to Structr before you can import the data. The reason for that is that it is not possible to handle large amounts of data using copy & paste in your browser.

MailService

mail.maxemails Maximum amount of emails that are synchronized for each mail account.
max.updateinterval Interval in milliseconds at which mailboxes are checked.
max.attachmentbasepath Base path in the filesystem for the storage of mail attachments.

Application Configuration

The Application Configuration Settings tab contains all settings controlling the behavior of the running application. In particular this includes settings regarding the Filesystem and Schema, as well as Encryption, Login behavior and Application Security. The Application Configuration Settings are subdivided into the following sections: