cloudinary-community / photocrate

Photo library and interactive editor built with Next.js & Cloudinary
https://www.photobox.dev/
MIT License
119 stars 13 forks source link

Automate deleting assets #17

Open colbyfayock opened 1 month ago

colbyfayock commented 1 month ago

GitHub Action? how do you track an asset was tagged as deleted 30 days ago? metadata?

nickytonline commented 1 month ago

Metadata sounds like a good approach. Instead of a GitHub Action, since this is deployed to Vercel, you could opt to use their cron job feature.

Happy to assist once I've done the speed run of the course. 😅

colbyfayock commented 1 month ago

thats not a bad idea!

that would definitely be a simpler and cleaner approach, though my only consideration there is that would drive Vercel costs up (to more quickly reach free tier) where GitHub Actions are largely free

wdyt?

colbyfayock commented 1 month ago

i have this repo that i use for automating cleanup of example projects i have to avoid them being stored and linked to

https://github.com/colbyfayock/cloudinary-cron/blob/main/.github/workflows/media-library-cleanup.yml https://github.com/colbyfayock/cloudinary-cron/blob/main/src/media-library-cleanup.js

just showing it as an example of how ive done it. it would need to check that metadata like you mentioned to ensure it was 30 days