Skip to content

BytesField

Defined in: packages/core/src/fields/bytes/types.ts:79

Resolved configuration for a bytes() field, after all defaults are applied.

  • BytesFieldInput for the user-facing input type
  • bytes for the config function that produces this type

TCollectionSlug extends VexResourceSlug = VexResourceSlug

TFieldMeta extends BaseFieldMeta = BaseFieldMeta

accept: string

Defined in: packages/core/src/fields/bytes/types.ts:87

Restricts the admin form’s File tab picker/dropzone by mimeType.


admin: FieldAdminConfig<TCollectionSlug>

Defined in: packages/core/src/fields/baseTypes.ts:642

Resolved admin UI configuration with all defaults applied.

BaseField.admin


optional defaultValue?: ArrayBuffer

Defined in: packages/core/src/fields/bytes/types.ts:89

Pre-filled value shown in the admin form when creating a new document.

BaseField.defaultValue


optional dependsOn?: readonly string[]

Defined in: packages/core/src/fields/baseTypes.ts:663

Other fields whose change re-runs this field’s validate() on a partial write.

BaseFieldInput.dependsOn

BaseField.dependsOn


optional description?: string

Defined in: packages/core/src/fields/baseTypes.ts:651

Semantic description of the field. Used in three places:

  1. Helper text rendered below the field input in the admin form UI.
  2. As the Zod .meta({ description }) value for form validation.
  3. As the JSDoc comment on the generated document interface property.

To write a separate JSDoc comment, use interfaceDescription in addition.

BaseField.description


optional index?: ResolvedFieldIndexConfigInput

Defined in: packages/core/src/fields/baseTypes.ts:655

Convex index name for this field, or the object form for a compound index.

BaseField.index


optional interfaceDescription?: string

Defined in: packages/core/src/fields/baseTypes.ts:653

The JSDoc comment on the generated document interface property

BaseField.interfaceDescription


interfaceType: string

Defined in: packages/core/src/fields/baseTypes.ts:657

TypeScript type string written to generated document interfaces (e.g. "string", "number", "string[]").

BaseField.interfaceType


label: string

Defined in: packages/core/src/fields/baseTypes.ts:631

Display label shown in the admin form. Always set — inferred from the field key if not provided.

BaseField.label


maxSize: number

Defined in: packages/core/src/fields/bytes/types.ts:85

Maximum accepted payload size, in bytes.

524_288

meta: TFieldMeta

Defined in: packages/core/src/fields/baseTypes.ts:658

BaseField.meta


nullable: boolean

Defined in: packages/core/src/fields/baseTypes.ts:635

Whether null is a legal value for this field, in addition to its normal type.

BaseField.nullable


required: boolean

Defined in: packages/core/src/fields/baseTypes.ts:633

Whether this field is required in the database schema.

BaseField.required


readonly type: "bytes"

Defined in: packages/core/src/fields/bytes/types.ts:83

optional validate(props): void | Promise<void>

Defined in: packages/core/src/fields/bytes/types.ts:91

Server-only async validation with value typed as ArrayBuffer.

FieldValidateProps<TCollectionSlug, ArrayBuffer>

void | Promise<void>

FieldValidate

BaseField.validate