Skip to content

createMediaDocument

createMediaDocument<TDataModel>(ctx, args): Promise<string>

Defined in: packages/file-storage-convex/src/adapter/methods.ts:23

Inserts a media document into the target collection table after a file upload completes.

TDataModel extends GenericDataModel = GenericDataModel

GenericMutationCtx<TDataModel>

Convex mutation context.

Document fields: collectionSlug, storageId, filename, mimeType, size, optional alt and adapterFields.

Record<string, unknown>

string

string

string

string

number

string

Promise<string>

Promise resolving to the new media document ID as a string.