File

This field is used to upload a file in the entry. It has a feature called sizeLimitMb to limit the size of the uploaded file.

{
"type": "file",
"id": "file",
"label": "File",
"showInTable": true,
"isRequired": true,
"accept": ".docx",
"sizeLimitMb": 5
}

The above example allows the user to enter a word document file type (.docx) of maximum size - 5 MegaBytes.

Field Attributes

NameTypeDescription
idstringAssigns a name for the given field on the backend. This name can be used to refer this field in another field
labelstringAdds a label to the given field
isRequiredbooleanMakes a field mandatory
showInTablebooleanDisplays the field in a table after saving the entry
acceptstringIndicates the acceptable file types to the user
sizeLimitMbnumberLimits the size of the uploaded file