Skip to content

getUrl

getUrl<TDataModel>(ctx, args): Promise<{ error?: undefined; url: string; } | { error: string; url?: undefined; }>

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

Resolves a serving URL for a media document by looking up its storageId and calling ctx.storage.getUrl().

TDataModel extends GenericDataModel = GenericDataModel

GenericQueryCtx<TDataModel>

Convex query context.

collectionSlug and mediaId of the target media document.

string

string

Promise<{ error?: undefined; url: string; } | { error: string; url?: undefined; }>

Promise resolving to { url } on success or { error } if the document or file is not found.