Skip to content

Files Block – the attachments of a record

The files block shows the files attached to the record and offers a place to drop new ones. Files are kept in an external storage – Azure Blob Storage or an S3 storage – and filed under an identifier, so that one record can keep several separate sets of files.

This page is part of the form block reference.


1. At a glance

Purpose Upload, list, preview, download and remove the files of a record
Typical use Contracts of a customer, photos of a damage report, attachments of a ticket
Related AI Assistant Block (attaching these files to a chat), API access and credentials

The block is only offered in forms that belong to an entity.


2. Settings

Setting Meaning Default / required
"Variant" UploadArea: drop zone and the full list of files. Badges: a read-only row of small file badges. UploadArea
"Identifier" What the files are filed under, as a text expression – for example contracts Required. If it yields nothing, the block shows no files and takes none.
"Allow Upload" Condition under which the user may add and remove files allowed
"Allow Download" Condition under which the user may open, preview and download files allowed
"Hide Files" Condition that hides the list of files and leaves only the drop zone shown
"File Provider" The storage: Azure Blob Storage or S3 Storage Required. There is no default.
"Provider Credentials" The credentials the storage is reached with – Azure Blob Storage credentials or S3 credentials, matching the provider Required

In addition, the block has the settings every block has, except "Flush".


3. Behaviour

Which files a block shows

The files belong to the record of the form. Two blocks with the same identifier, provider and credentials show the same files. Use a different identifier per purpose to keep contracts and photos apart.

Uploading and removing

  • New files are dropped onto or picked in the drop zone. They are stored together with the record – until the record is saved, they are only pending, and "Discard" drops them.
  • Files are removed with the button in their row. The removal also takes effect when the record is saved.
  • "Allow Upload" controls both: without it there is neither a drop zone nor a remove button.

The badge variant

Badges shows one small badge per file with icon, name and size – for places where the attachments are a footnote of something else, below a description or a mail. It is read-only whatever "Allow Upload" says. A form that shows badges and still has to take files needs a second block with the same identifier.

Preview

A click on a file opens it in a preview over the application instead of downloading it. The preview header shows the size, who uploaded the file and when, and a download button.

File Preview
Pictures (.png, .jpg, .gif, .webp, .bmp, .svg, .avif) The picture
PDF The document
Text (.txt, .json, .xml, .csv, .log, .md, .yml, .html, .css, .js, .sql) The text; only the first 512 KB
Anything else A hint and the download button

Pictures and PDFs larger than 25 MB are not previewed; the preview offers the download instead. Without "Allow Download" there is no preview either – files are then shown as plain entries that cannot be opened.


4. Examples

Contracts and photos of a customer. Two files blocks on the customer form, both with the same provider and credentials: one with "Identifier" = contracts, one with photos. Only users of the role "Sales" may upload contracts: "Allow Upload" = a condition on the system function CurrentUserRoleNames.

Attachments under a mail entry. In the card form of a timeline entry, a files block with "Variant" = Badges shows the attachments of the mail in one line.