VexMediaDocument
Defined in: packages/core/src/api/convex.ts:58
Type for media documents returned from Convex queries.
Extends VexDocument with all required media fields: alt, filename,
mimeType, size, storageId, deleted, src (the file URL), and optional
width/height. Use this instead of TDocument in media collection views to
avoid casting fields like row.original.src as string.
Example
Section titled “Example”const src = doc.src; // string | undefined, no cast neededconst alt = doc.alt ?? "";TDocument for the base document type with custom shape support
Extends
Section titled “Extends”Indexable
Section titled “Indexable”[
key:string]:unknown
Field values defined by the collection schema.
Properties
Section titled “Properties”_creationTime
Section titled “_creationTime”_creationTime:
number
Defined in: packages/core/src/api/convex.ts:26
Unix timestamp (milliseconds) when the document was created.
Inherited from
Section titled “Inherited from”_id:
string
Defined in: packages/core/src/api/convex.ts:24
Convex document ID string.
Inherited from
Section titled “Inherited from”alt:
string
Defined in: packages/core/src/api/convex.ts:60
Alt text for accessibility and SEO.
deleted
Section titled “deleted”deleted:
boolean
Defined in: packages/core/src/api/convex.ts:70
Whether this media item has been soft-deleted.
filename
Section titled “filename”filename:
string
Defined in: packages/core/src/api/convex.ts:62
Original filename of the uploaded file.
height?
Section titled “height?”
optionalheight?:number
Defined in: packages/core/src/api/convex.ts:76
Image height in pixels (if applicable).
mimeType
Section titled “mimeType”mimeType:
string
Defined in: packages/core/src/api/convex.ts:64
MIME type (e.g., “image/jpeg”, “application/pdf”).
size:
number
Defined in: packages/core/src/api/convex.ts:66
File size in bytes.
src:
string
Defined in: packages/core/src/api/convex.ts:72
URL to the file.
storageId
Section titled “storageId”storageId:
string
Defined in: packages/core/src/api/convex.ts:68
Storage adapter ID for the uploaded file.
width?
Section titled “width?”
optionalwidth?:number
Defined in: packages/core/src/api/convex.ts:74
Image width in pixels (if applicable).