# 🇨🇳 Change the max size of uploads/attachments | Discourse 修改上传附件的大小

**URL:** <https://meta.discourse.org/t/change-the-max-size-of-uploads-attachments-discourse/268317>\
**Category:** Sysadmins\
**Tags:** chinese-translation\
**Created:** [2023年六月14日 14:57 UTC](https://meta.discourse.org/t/change-the-max-size-of-uploads-attachments-discourse/268317 "2023-06-14T14:57:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/honeymoose/32/198718_2.png) [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**Post date:** [2023年六月14日 14:57 UTC](https://meta.discourse.org/t/change-the-max-size-of-uploads-attachments-discourse/268317/1 "2023-06-14T14:57:27Z")

</div>

Discourse 附件上传大小是需要修改配置文件后重启的。

官方的帖子在：[Change the maximum attachment/upload size - sysadmin - Discourse Meta](https://meta.discourse.org/t/change-the-maximum-attachment-upload-size/26435) 页面中。

 ![](https://global.discourse-cdn.com/meta/original/4X/9/4/4/944224075fedc601f5e440d492f2c9743548ac5c.png)  
默认的上传大小为 10 MB

需要把上面的参数添加到 Discourse 配置文件后重新编译。

修改完成后，进入目录：`/var/discourse` 然后运行命令：

```plaintext
./launcher rebuild app

```

来进行重新编译。

## 管理控制界面修改

只修改上面的配置文件是不够的，还需要在后台的管理控制界面内也进行调整。

 ![](https://global.discourse-cdn.com/meta/original/4X/b/2/3/b2326da31168501b902840e3e0e46dbdd5964804.png)  
至此完成修改后，就可以让你的 Discourse 支持更大的附件上传了。

如有什么其他疑问和需要帮助的，请访问我们的网站（中文）：[iSharkFly - 飞鲨](https://www.ossez.com/t/discourse/14511)

---

_[View the full topic](https://meta.discourse.org/t/change-the-max-size-of-uploads-attachments-discourse/268317)._
