Attachment Fields
The media category covers file uploads and the barcode field. single-attachment and multiple-attachments upload files into a storage bucket; barcode stores a scannable value (documented in detail on the Structured & Media Fields page). All share the base field properties.
| Type | Stores |
|---|---|
single-attachment |
A single uploaded file. |
multiple-attachments |
Multiple uploaded files. |
barcode |
A barcode value — see Structured & Media Fields. |
single-attachment
One uploaded file (avatar, document, image).
| Property | Description |
|---|---|
bucket |
Storage bucket name. References a bucket in app.buckets. Uses the implicit default bucket when omitted. |
allowedFileTypes |
Array of allowed MIME types (e.g. ["image/png", "image/jpeg"]). All types allowed when empty. |
maxFileSize |
Maximum file size in bytes (integer ≥ 1). Example: 5242880 for 5 MB. |
storeMetadata |
Boolean. Store metadata (image dimensions, video duration). |
- id: 1
name: avatar
type: single-attachment
bucket: avatars
allowedFileTypes: [image/png, image/jpeg, image/gif]
maxFileSize: 5242880
storeMetadata: truemultiple-attachments
Many uploaded files (a gallery, a document set).
| Property | Description |
|---|---|
bucket |
Storage bucket name. References a bucket in app.buckets. Uses default when omitted. |
maxFiles |
Maximum number of files allowed (integer ≥ 1). |
allowedFileTypes |
Array of allowed MIME types (e.g. ["application/pdf", "application/msword"]). |
maxFileSize |
Maximum size in bytes per attachment (integer ≥ 1). Example: 10485760 for 10 MB. |
storeMetadata |
Boolean. Store metadata for each attachment. |
- id: 2
name: documents
type: multiple-attachments
bucket: documents
maxFiles: 10
allowedFileTypes: [application/pdf, application/msword]
maxFileSize: 10485760Buckets, not inline storage. Attachment fields write to named buckets defined in app.buckets (local or S3). The bucket property selects which one; omitting it uses the implicit default bucket. maxFileSize is always specified in bytes. See the Buckets documentation for bucket configuration.
The barcode field is the third member of the media category but is documented alongside the other specialized value fields — see Structured & Media Fields → barcode.
Last updated August 11, 2026
This documentation was written with AI, so errors or outdated content are possible. Sovrium is in beta. Contributions and corrections are welcome.