Data Types

Expiring Files with TTLs

Upload supports Time To Live (TTL) rules for files. This allows you to automatically delete files after a certain period of time.

Using TTLs

1) Create a TTL Rule

Navigate to: https://upload.io/dashboard/rules/ttls

Add a new file TTL

2) Define your TTL Rule

Define a TTL rule to delete files uploaded with the my_example_project tag after 1 hour:

Configure your file TTL

Note: TTL rules only take effect on files uploaded after the TTL rule is created/updated.

3) Using your TTL Rule

To use your TTL rule, you must tag your uploads with the my_example_project tag.

You can tag uploads automatically via your API key's settings:

3.1) Edit an API Key

Navigate to: https://upload.io/dashboard/security/api_keys

Edit your API key

3.2) Add the tag (to your API Key)

This will automatically tag all uploads (made using this API key) with the my_example_project tag:

Add a tag to your API keySet the tag for your API key

3.3) Save changes (to your API Key)

After saving changes to your API key, all uploads made using this API key will expire after 1 hour.

Save changes to your API key

Note: files are deleted within 2 minutes of expiration.

Was this section helpful? Yes No

You are using an outdated browser.

This website requires a modern web browser -- the latest versions of these browsers are supported: