Setting TTL on object in Spaces (Not talking about CDN)

Is there a way to set a TTL at upload time on an object? I use Spaces for logging and don’t want to have to manually make API calls to delete data every few weeks.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, Thanks for reaching out to DigitalOcean!

I’m not sure what exactly you mean by TTL value for objects. In general, the TTL value at CDN which will be applied for all the objects. Please refer to below link , which explains on how to setup using CDN:

However, if you are looking for any object to be deleted after X number of days then you should set the lifecycle rules for Spaces. This can be applied to any folder in your Spaces in which all the objects will be deleted after X days. Here’s our API documentation which will help you in setting lifecycle rules:

Cheers, Sri Charan