{ "$id": "https://altinncdn.no/schemas/json/component/FileUpload.schema.v1.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "FileUpload component", "description": "Schema that describes the layout configuration for a FileUpload component.", "type": "object", "properties": { "id": { "$ref": "common-defs.schema.v1.json#/$defs/id" }, "type": { "type": "string", "title": "Type", "description": "The component type.", "const": "FileUpload" }, "dataModelBindings": { "$ref": "common-defs.schema.v1.json#/$defs/basicDataModelBindings" }, "textResourceBindings": { "type": "object", "title": "Text resource bindings", "description": "Text resource bindings for a component.", "properties": { "title": { "type": "string" } }, "required": [ "title" ], "additionalProperties": true }, "maxFileSizeInMB": { "title": "Maximum file size in MB", "description": "Sets the maximum file size allowed in megabytes.", "type": "integer", "minimum": 0 }, "maxNumberOfAttachments": { "title": "Maximum allowed attachments", "description": "Sets the maximum number of attachments allowed to upload.", "type": "integer", "minimum": 0 }, "minNumberOfAttachments": { "title": "Minimum allowed attachments", "description": "Sets the minimum number of attachments to upload", "type": "integer", "minimum": 0 }, "displayMode": { "title": "Display mode", "description": "Sets the display mode for the file upload component.", "type": "string", "enum": [ "simple", "list" ] }, "hasCustomFileEndings": { "title": "Has custom file endings", "description": "Boolean value indicating if the component has valid file endings", "type": "boolean" }, "validFileEndings": { "title": "Valid file endings", "description": "A separated string of valid file endings to upload. If not set all endings are accepted.", "examples": [ ".csv", ".doc", ".docx", ".gif", ".jpeg", ".pdf", ".txt" ], "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "renderAsSummary": { "title": "Render as summary", "description": "Boolean or expression indicating if the component should be rendered as a summary. Defaults to false.", "default": false, "$ref": "../layout/expression.schema.v1.json#/definitions/boolean" }, "hidden": { "title": "Hidden", "description": "Boolean value or expression indicating if the component should be hidden. Defaults to false.", "default": false, "$ref": "../layout/expression.schema.v1.json#/definitions/boolean" }, "grid": { "type": "object", "title": "Grid", "description": "Settings for the components grid. Used for controlling horizontal alignment.", "$ref": "common-defs.schema.v1.json#/$defs/gridSettings", "examples": [ { "xs": 12 } ] }, "pageBreak": { "$ref": "common-defs.schema.v1.json#/$defs/pageBreak" } }, "required": [ "id", "type", "displayMode", "maxFileSizeInMB", "maxNumberOfAttachments", "minNumberOfAttachments" ], "additionalProperties": false }