discourse论坛配置更高的存储空间

Here is what you need to do to allow more than 10mb for attachments upload.

  1. Connect to your server via SSH
  2. Navigate to and edit the .yml config file
cd /var/discourse/
nano containers/app.yml
  1. Scroll down where it says this:
params:
  ## Which Git revision should this container use? (default: tests-passed)
  1. Add upload_size: 20m below this. Be super careful with spaces. It should now look something like this:
params:
  ## Which Git revision should this container use? (default: tests-passed)
  version: tests-passed

  ## Maximum upload size (default: 10m)
  upload_size: 20m
  1. After making changes press Ctrl+X (to exit) and then Y to save
  2. From /var/discourse run:
./launcher rebuild app

Once rebuild is complete, navigate to /admin/site_settings/category/files and change the max attachment size kb to 20480 (20mb) or your desired number. At this point everything should work perfectly, you can go on and test your upload file size.

Cheers.