# 配置兼容S3的对象存储提供商用于上传

**URL:** https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916
**Category:** Self-Hosting
**Tags:** cdn, configuring, how-to, reference
**Created:** [2020年四月22日 22:37 UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916 "2020-04-22T22:37:37Z")
**Posts on this page:** 1
**Showing post:** 256

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [2021年十一月12日 03:30 UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/256 "2021-11-12T03:30:46Z")

</div>

我设置了 [S3 上传](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229?u=omarfilip) 和对象存储，如 OP 中所述，但没有 CDN。

对于 DISCOURSE\_S3\_CDN\_URL 变量，我有这个：  
`https://my-bucket-uploads.s3.dualstack.us-west-2.amazonaws.com`

一切似乎都正常，包括备份，但是，在控制台中，当回复帖子时，会出现此错误：

 ![console-error](https://global.discourse-cdn.com/meta/original/3X/4/7/475beef1e29cacfa1f7386213b726a0f9785c0b4.jpeg)

错误中的请求 URL 实际上是两个 URL 的字符串，这似乎是原因？

`https://mydiscourse.com/t/uploads-test-for-s3/79/https://my-bucket-uploads.s3.dualstack.us-west-2.amazonaws.com/assets/markdown-it-bundle-a7328b73d3e7b030770eab70f10bdb0af655b3d8fa929bc49f1ad04c4cdaa198.br.js`

---

_[View the full topic](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916)._
