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:
@@ -2,6 +2,16 @@ import type { CollectionConfig } from "payload";
|
|||||||
|
|
||||||
export const media: CollectionConfig = {
|
export const media: CollectionConfig = {
|
||||||
slug: "media",
|
slug: "media",
|
||||||
|
custom: {
|
||||||
|
retention: {
|
||||||
|
purgeSchedule: "monthly",
|
||||||
|
postDeletion: {
|
||||||
|
duration: "P90D",
|
||||||
|
trigger: "after-deletion",
|
||||||
|
action: "hard-delete",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
upload: {
|
upload: {
|
||||||
mimeTypes: ["image/*", "application/pdf"],
|
mimeTypes: ["image/*", "application/pdf"],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user