hyperzoneH
Convex Community2y ago
1 reply
hyperzone

Deleting an image when deleting an item

Say I have this part in the schema(using ents):
    items: defineEnt({
      name: v.string(),
      description: v.string(),
      image: v.id("_storage"),
    })


do I have to delete the image "manually" using
ctx.storage.delete(storageId);

or is there a way to make it happen automatically when an item gets deleted?
Was this page helpful?