MediaCollectionConfigInput
MediaCollectionConfigInput<
TFieldMeta,TCollectionMeta,TCollectionSlug,TFields,TComponent> =Omit<CollectionConfigInput<TFieldMeta,TCollectionMeta,TCollectionSlug,TFields,TComponent>,"fields">
Defined in: packages/core/src/media/types.ts:42
Configuration input for a defineMediaCollection() call.
Identical to CollectionConfigInput except fields is omitted — media
collections have a fixed set of system fields (alt, filename, mimeType,
size, storageId, deleted, convexUrl, width, height) that
defineMediaCollection() always injects. Pass extra custom fields via the
fields override on defineMediaCollection().
Type Parameters
Section titled “Type Parameters”TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends BaseFieldMeta = BaseFieldMeta
TCollectionMeta
Section titled “TCollectionMeta”TCollectionMeta extends MediaCollectionMeta = MediaCollectionMeta
TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends MediaCollectionSlug = MediaCollectionSlug
TFields
Section titled “TFields”TFields extends Record<string, AdminField<TFieldMeta>> = Record<string, AdminField<TFieldMeta>>
TComponent
Section titled “TComponent”TComponent extends ComponentHKT = ComponentHKT
Example
Section titled “Example”const images = defineMediaCollection({ slug: "images", labels: { singular: "Image", plural: "Images" },});- MediaCollectionConfig for the resolved type after defaults are applied
- file-storage-convex/src!defineMediaCollection from
@vexcms/file-storage-convex