Admin Upload Limit Different from User

The default upload limit for attachments is 10 MB. This is a global setting and it applies even to admins. I was wondering why an admin has any upload limit at all? Let’s say I wanted to upload a file on my site like an application or a program. I want users to be able to download that program. Since I am an admin, I know what I’m uploading and that it’s safe. Why should I have the same limit as a regular user?

2 Likes

You are conflating two different settings here

  • max image size (4mb by default)
  • max attachment size (10mb by default)
3 Likes

Ok oops. I meant the max attachment size. Hence, I mean 10 MB, not 4 MB. I want the admin to be able to attach any file or at least set the admin attachment limit separately in the admin panel. Say 200 MB for a limit for attachment for admins.

1 Like

This could be a good feature, as staff must have an ability to upload files of any size – regular users not. There is already an option called authorized extensions for staff , so why not add an ability for staff themselves to control size of uploaded files or make it unlimited?

Also, would that be possible for uploads.json?client_id=000000000000000 also set some additional param that would always be the same for the given user (disregard of session), so perhaps it would be possible to differentiate the size of uploads for different users (staff vs regular/unauthenticated), so on webserver side we could define client_max_body_size (or whatever) based on location (which considered query as well)? So Discourse upload query would look like uploads.json?client_id=000000000000000&user_id=constant_hashed_user_id_string.

In short, we need to have an ability to upload larger files, like share beta version of our software with specific people (for testing) but users almost never need more than 2M.

Thank you for fantastic software and making the world a better place! <3

2 Likes