Reference Field Reference
fields.file()
Single file upload. Never localizable.
Single file upload. Maps to editor { name: 'str-file', type: 'file' }. Output is the canonical FileValue from @strifeapp/types: { name, size, type, extension, src, draft }.
Example
fields.file({
label: 'Attachment',
allowedTypes: '.pdf,.docx',
})Options
| Option | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Label shown to editors in Strife Studio. |
description | string | No | Tooltip shown to editors. |
searchable | boolean | No | Include in the team's search index. |
filterable | boolean | No | Allow filtering content lists by this value. |
protected | boolean | No | Restrict editing to users with the appropriate permission. |
propertyName | string | No | Override the stored property name. |
allowedTypes | string | null | No | Restrict uploads to these types — comma-separated extensions and/or MIME types. |
No localizable option.
Output type
FileValue ({ name, size, type, extension, src, draft }).
See also
- File~ — the same editor, documented from the Strife Studio UI side.