# Set up file and image uploads to S3

**URL:** https://meta.discourse.org/t/set-up-file-and-image-uploads-to-s3/7229
**Category:** Self-Hosting
**Tags:** configuring, how-to
**Created:** [06.Июнь.2013 19:37:43 UTC](https://meta.discourse.org/t/set-up-file-and-image-uploads-to-s3/7229 "2013-06-06T19:37:43Z")
**Posts on this page:** 1
**Showing post:** 257

<div class="post-metadata">

### Author: ![kuaza](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuaza/32/264151_2.png) [@kuaza](https://meta.discourse.org/u/kuaza)
#### Post date: [05.Май.2024 13:01:21 UTC](https://meta.discourse.org/t/set-up-file-and-image-uploads-to-s3/7229/257 "2024-05-05T13:01:21Z")

</div>

После некоторых усилий я перешёл на R2 _(не забудем друзей, которые помогли, уважение)_. Файлы ассетов и загрузок публикуются в Cloudflare. Единственная проблема в том, что я не смог настроить автоматическую загрузку файлов theme-javascripts и stylesheets в R2. Я займусь этим вопросом, когда у меня будет время.

> [@Cloudflare R2: Navigating Setup and Handling Configuration Errors](https://meta.discourse.org/t/cloudflare-r2-navigating-setup-and-handling-configuration-errors/305617/6):
>
> I tried everything but I always get this error: Aws::S3::Errors::BadRequest I wonder what I’m missing? When I upload an image from the R2 panel, this image opens with the special cdn url. The problem is that the image cannot be loaded on the site. I created cors and opened all methods. [{ "AllowedOrigins": ["https://SITENAME.com"], "AllowedMethods": ["GET", "POST", "HEAD", "DELETE", "PUT"] } ] any ideas?

---

_[View the full topic](https://meta.discourse.org/t/set-up-file-and-image-uploads-to-s3/7229)._
