# 配置兼容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:** 258

<div class="post-metadata">

### Author: ![unteem](https://avatars.discourse-cdn.com/v4/letter/u/d07c76/32.png) [@unteem](https://meta.discourse.org/u/unteem)
#### Post date: [2022年一月14日 11:08 UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/258 "2022-01-14T11:08:43Z")

</div>

我也遇到了同样的情况，配置了对象存储（minio）但没有 CDN。这是否是一个可以支持的用例？

根据我目前测试的来看，只有 `markdown-it-bundle` 这个 js 文件有问题，因为它指向了错误的 URL - `DISCOURSE_HOSTNAME/DISCOURSE_S3_CDN_URL/assets/markdown-it-bundle-HASH.br.js`

这看起来像是一个 bug，如果我设置了 `DISCOURSE_CDN_URL` 变量，它仍然会以 `DISCOURSE_HOSTNAME/DISCOURSE_CDN_URL/assets/markdown-it-bundle-HASH.br.js` 的形式指向错误的 URL。

它实际上应该指向 `DISCOURSE_S3_CDN_URL/assets/markdown-it-bundle-HASH.br.js`

其他的 js 资源都指向正确的 URL。

我猜从你的话来看，我还会遇到其他尚未发现的问题。也许你可以提供更多关于可能出错的信息？

如果我理解得没错，js 资源在对象存储上，样式表应该在 CDN 上。没有 CDN 的情况下，样式表是否可以像往常一样由应用程序提供？（从我看到的情况来看，确实是这样）

感谢你的帮助。

---

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