MediaCollectionConfigInput
MediaCollectionConfigInput<
TFieldMeta,TCollectionMeta,TCollectionSlug,TFieldSlug,TComponent> =Omit<CollectionConfigInput<TFieldMeta,TCollectionMeta,TCollectionSlug,TFieldSlug,TComponent>,"fields">
Defined in: packages/core/src/media/types.ts:41
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
TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = string
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