# Files uploaded to AmazonS3/MinIO get expiresAt and disappear despite URL expiry & retention disabled

**URL:** <https://forums.rocket.chat/t/files-uploaded-to-amazons3-minio-get-expiresat-and-disappear-despite-url-expiry-retention-disabled/22760>\
**Category:** Community Support\
**Created:** [February 27, 2026, 9:01am UTC](https://forums.rocket.chat/t/files-uploaded-to-amazons3-minio-get-expiresat-and-disappear-despite-url-expiry-retention-disabled/22760 "2026-02-27T09:01:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://forums.rocket.chat/u/dan)\
**Post date:** [February 27, 2026, 9:01am UTC](https://forums.rocket.chat/t/files-uploaded-to-amazons3-minio-get-expiresat-and-disappear-despite-url-expiry-retention-disabled/22760/1 "2026-02-27T09:01:36Z")

</div>

I’m running Rocket.Chat version 8.0.1 in a Docker container and minIO also in a docker container for file uploads.  
Files uploaded via Rocket.Chat (store: `AmazonS3:Uploads`) are automatically assigned an `expiresAt` timestamp and become unavailable after ~1 day, even though:

- URL expiration is set to 0

- File retention policies are disabled

**Environment:**

- Rocket.Chat version: x.y.z

- Deployment: Docker

- Storage: AmazonS3 (MinIO backend)

- MongoDB: 7.0

**Observed Behavior:**

- Uploaded files work immediately.

- After ~1 day, files stop being downloadable/previewable.

- In MongoDB, `rocketchat_uploads` documents always have `expiresAt = uploadedAt + ~1 day`.

- `expiresAt` persists for new uploads even after disabling URL expiry & retention policies.

**What I’ve Checked / Tried:**

- `FileUpload_S3_URLExpiryTimeSpan = 0` in admin settings

- Disabled all retention policies

- Verified Mongo indexes; `expiresAt` index is **not** TTL

- Only one Rocket.Chat + Mongo instance running

**Questions:**

1. Should Rocket.Chat continue setting `expiresAt` when URL expiry and retention are disabled?

2. How can uploads remain accessible indefinitely with AmazonS3/MinIO?

3. Are there server-side jobs or TTL configs outside Mongo that delete files based on `expiresAt`?

4. If this is a bug, which part of the code controls setting `expiresAt` for S3 uploads?

---

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://forums.rocket.chat/u/dan)\
**Post date:** [March 2, 2026, 6:37pm UTC](https://forums.rocket.chat/t/files-uploaded-to-amazons3-minio-get-expiresat-and-disappear-despite-url-expiry-retention-disabled/22760/2 "2026-03-02T18:37:39Z")

</div>

This issue is fixed!  
`rooms.media` uploads the files as `unconfirmed` by default. You need to `confirm` them by sending a message that references it with `mediaConfirm` endpoint.

By default, unconfirmed files are removed after 1 day. Confirmed files are not removed automatically (except with retention policy enabled)
