# S3 uploads and Cache-Control

**URL:** https://meta.discourse.org/t/s3-uploads-and-cache-control/25318
**Category:** Feature
**Created:** [February 17, 2015, 2:44pm UTC](https://meta.discourse.org/t/s3-uploads-and-cache-control/25318 "2015-02-17T14:44:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![masda70](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@masda70](https://meta.discourse.org/u/masda70)
#### Post date: [February 17, 2015, 2:44pm UTC](https://meta.discourse.org/t/s3-uploads-and-cache-control/25318/1 "2015-02-17T14:44:10Z")

</div>

I’m aware that S3 setups for upload are not really recommended anymore vs origin pull CDNs, but I have a fairly old installation and I’ve been worried at how Discourse handles Cache control rules for S3 uploads.

So far I’ve noticed that Etag/last-modified headers are set properly, but no Cache-Control header is set for S3 uploads. Since the official nginx setup uses Cache-control rules for avatar/uploads, it would help a lot to have S3 uploads use the same set of parameters. S3 does not let me set global HTTP headers, so it has to be done from the discourse app.

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [May 30, 2016, 8:49am UTC](https://meta.discourse.org/t/s3-uploads-and-cache-control/25318/2 "2016-05-30T08:49:08Z")

</div>

Similar question- since now S3 is supported again, can S3 uploads by default have a cache-control metadata set for more effective control of S3 costs? Thanks.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [December 4, 2025, 11:33am UTC](https://meta.discourse.org/t/s3-uploads-and-cache-control/25318/3 "2025-12-04T11:33:34Z")

</div>


