Skip to main content

MAX_REFERENCE_METADATA_BYTES

@forge/monorepo


@forge/monorepo / backend/src / MAX_REFERENCE_METADATA_BYTES

Variable: MAX_REFERENCE_METADATA_BYTES

const MAX_REFERENCE_METADATA_BYTES: 2048 = 2048

Defined in: backend/src/core/validation.ts:26

The most a reference part's provider bag may hold (#130).

Small on purpose. providerMetadata is Record<string, unknown>, which is exactly the shape a base64 payload fits into — and a file part carrying its own content would satisfy every other rule in this file while breaking the one that matters. 2 KiB is room for a provider's ids and flags and no room for a document.