deleteMedia
deleteMedia<
TDataModel>(ctx,args):Promise<boolean>
Defined in: packages/file-storage-convex/src/adapter/methods.ts:58
Deletes a media document — physically removes the file from Convex storage
unless softDelete is true, in which case the document is patched with { deleted: true }.
Type Parameters
Section titled “Type Parameters”TDataModel
Section titled “TDataModel”TDataModel extends GenericDataModel = GenericDataModel
Parameters
Section titled “Parameters”GenericMutationCtx<TDataModel>
Convex mutation context.
collectionSlug, mediaId, and optional softDelete flag.
collectionSlug
Section titled “collectionSlug”string
mediaId
Section titled “mediaId”string
softDelete?
Section titled “softDelete?”boolean
Returns
Section titled “Returns”Promise<boolean>
Promise resolving to true if the document was found and processed, false if not found.