feat(media): add retention metadata to media collection

Adds custom.retention (monthly purge, 90-day post-deletion hard-delete)
to the media Payload collection. No uploadedBy field exists in the
collection so no custom.pii annotation is needed.
This commit is contained in:
2026-05-18 19:16:23 +00:00
parent 68240ad0f3
commit 3b2d618cfc

View File

@@ -2,6 +2,16 @@ import type { CollectionConfig } from "payload";
export const media: CollectionConfig = {
slug: "media",
custom: {
retention: {
purgeSchedule: "monthly",
postDeletion: {
duration: "P90D",
trigger: "after-deletion",
action: "hard-delete",
},
},
},
upload: {
mimeTypes: ["image/*", "application/pdf"],
},