Can I increase the 1024000 kb limit on attachment?

I’m using S3 for attachment storage so that can handle up to 160GB.
I changed the nginx limit to 0 (unlimited)
The app.yml param “upload_size” is also set to 0

1 Like

We don’t upload straight into S3, it goes to your server first and the server sends it to S3. That means you don’t want a limit larger than you free disk space.

3 Likes

Ok, I would like to set the limit to 10GB i have enough disk space. But how can I change the Discourse limit?

1 Like

You can overwrite the max using a custom plugin. You can use this one as an example:

6 Likes

Thank you, I can confirm that the limit is gone with using this plugin and the settings:

files:
  max_attachment_size_kb:
    client: true
    default: 1024000
    max: 6144000

However, I have 2 problems:

  1. Uploading a 2GB file uploads well until 100% and then fails with general pop up error.
  2. Every time i try this the Discourse Docker grows 2GB in size and doesn’t clear it!! I’m nearly out of space… how can I clear this?
1 Like

You’re going to be better off using a proper cloud drive service of your choice, and linking the files in Discourse topics… Discourse isn’t intended as a large file storage tool.

4 Likes

I am using S3 cloud storage. Nothing is supposed to be stored on Discourse itself.

That’s not what I mean – I mean a consumer cloud drive service like Google Drive, OneDrive, Dropbox, etcetera.

Regardless of how you do it, Discourse is not designed to handle large files.

2 Likes

Regardless of where the file ends up, Discourse isn’t intended to be a bulky file upload mechanism either.

1 Like

I understand that it wasn’t intended to do that, but it would be a great feature for me and will increase user experience if they don’t have to go to some other service to upload and back to Discourse.
So I hope you won’t take offence if I try to get it to work despite the fact that it wasn’t the intention of the original development.

The wonders of open source is that you’re free to tinker.

Likewise if something isn’t supported there are no guarantees that future changes to Discourse won’t render the tweaks you’re making today totally inoperable in the future.

1 Like