Reputation: 131
I created an application and use Firebase as backend. In my application User can upload images and these images should be deleted after one week from the database. I don't know how I can delete stuff automatically and after an amount of time because the code is running on the devices of the user and maybe there will be hundreds of user. Does anyone have any idea how I can achieve that please ? Thanks
Upvotes: 2
Views: 243
Reputation: 174
AFAIK Firebase doesn't have support for adding a parameter to a query. You could try adding Cloud Function with a trigger to run a delete query when something is written to the database. https://firebase.google.com/docs/functions/gcp-storage-events
Upvotes: 1