toolmark-monorepo / @toolmark/core / fileFieldSchema
Function: fileFieldSchema()
fileFieldSchema(
spec):JsonSchema
Defined in: packages/core/src/files.ts:106
The JSON Schema a form's fill manifest uses for a file field (spec §8.4): an object with exactly one of ref (1–MAX_FILE_REF_LENGTH characters) / url (1– MAX_FILE_URL_LENGTH), described with the accepted types and size limit; when spec.multiple, an array of those with maxItems = spec.maxFiles (default DEFAULT_MAX_FILES).
Parameters
spec
The field's effective limits (maxBytes defaults to 10485760 in the description).
Returns
A fresh JSON Schema object.