Skip to content

Type Alias: MetadataCallback

ts
type MetadataCallback = (fileInfo) => Promise<Metadata> | Metadata;

Defined in: packages/ai-enhancer/src/widgets/ai-editor/ui/UcAiEnhancer.ts:90

Per-file metadata callback, mirroring the file uploader's metadata config option. Called at generation time with the source image's file info (the uploader passes its entry's .fileInfo); returns the metadata bag, optionally async. Only invoked when there is a source (an edit); a generate-from-scratch gets no callback. Use the static Metadata form to cover both.

Parameters

ParameterType
fileInfoUploadcareFile

Returns

Promise<Metadata> | Metadata