Introduction / FirstSpirit ServerManager / Project properties / Media constraints

Media constraints

The media uploaded to the media store can be limited to certain file sizes and/or formats using the options “Restrict allowed media size” and “Restrict allowed media types”. Both options can be activated separately or combined.

Important The constraints are used only when uploading new media; subsequent constraints will not affect existing media. In this case, warnings are logged during generation.

Restrict allowed media size

Restrict allowed media size: if this checkbox is selected, the input fields for entering a maximum file or image size are active.

Maximum file size: the maximum file size (in KB) for “file” type media uploads to the media store can be defined in this field. Files that are larger than the specified size limit cannot be added.

Maximum image size: the maximum file size (in KB) for “image” type media uploads to the media store can be defined in this field. Images that are larger than the specified size limit can no longer be added.

Only integers are permitted in these two fields. Entering other values, such as letters or characters, is immediately prevented, and the particular field starts flashing red.

Restrict allowed media types

On the right half of the media constraints section under the Restrict allowed media types selection box of the configuration interface is an option for limiting the file format for uploadable media. This is done by entering the file extensions. FirstSpirit identifies the file’s format based on its extension and by analyzing its content.

Permitted extensions: the permitted file extensions can be added or removed here. All extensions must be specified here without the ".".

The Add button is used to add and save an extension previously defined in the input field to the left of the Add button for the list of permitted extensions. The extensions are listed in alphabetical order.

The Remove button removes a file extension that has already been selected from the list.

MIME probing has priority: FirstSpirit uses different methods to determine the file type (text, JPEG image, Word document, etc.). If the content check returns a MIME type that does not match the file name extension, the result of the MIME check is used if the checkbox is activated, and uploading will only be allowed if the usual ending for this MIME type is permitted. This behavior always applies to images.

Displaying the constraints in SiteArchitect

The media constraints are displayed to the editor in the form of a filter constraint in the SiteArchitect file selection dialog, if this is activated in the project configuration. This also applies to the media wizard. Media that are larger than the defined size limit and/or have a file extension that is not permitted are not available as a selection in the file selection dialog.

Note: The file selection dialog's sort functionality (column headers in the view mode “Details”) can be deactivated. This can speed up work with the file selection dialog when the user needs to navigate among different directories of the client workstation's file system (Parameter Synthetica.extendedFileChooser.sortEnabled, see Configuring connection settings).

The restrictions are displayed once more to the right of "Files of type:" In the example, the files with the file extensions "jpg", "png" and "gif" up to a size of 1.95 MB may be selected and uploaded.

Important If the files that are to be copied via drag-and-drop from the directory structure of the workstation and then pasted to the media store are not permitted due to the media constraints, a relevant warning will appear. The files will not be added to the media store.

Activated restrictions in ContentCreator

The same technical implementation of filter rules in ContentCreator is not possible in SiteArchitect. Since the file selection dialog available in the browser for uploading media is not an integral FirstSpirit implementation, but is instead a firmly integrated part of every browser (e.g. Firefox, Mozilla, Internet Explorer, Opera), filtering technically cannot be done the same way as in SiteArchitect. The files are therefore filtered only after uploading and, if necessary, an error message appears to the user if the files exceed the media constraints defined in the project configuration.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy