Skip to content

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 }.

TDataModel extends GenericDataModel = GenericDataModel

GenericMutationCtx<TDataModel>

Convex mutation context.

collectionSlug, mediaId, and optional softDelete flag.

string

string

boolean

Promise<boolean>

Promise resolving to true if the document was found and processed, false if not found.