How to disable file uploads except Avatars

I am setting up a new forum, and don’t require image uploads for posts. Also, my hosting space is limited as I’m using the $5 plan on DO.

How to disable file uploads (except Avatars) in Discourse? I don’t see an option anywhere in the admin settings.

1 Like

The setting you want is “allowed extensions”. Remove all extensions from this list, and the option to upload will disappear from the composer. Looks like the helper text for this setting could stand improving to make this more obvious.

Edit: hmmm I just realized this also disables avatar uploads. Maybe a more knowledgeable person can give a better answer. Or this is a feature request to add a setting to disable file uploads while allowing avatar uploads.

3 Likes

Yes, if all image extensions are removed from the authorized extensions site setting, users will not be able to upload avatars.

To allow users to set custom avatars but not allow them to upload image files, you could point your users to https://en.gravatar.com/. Gravatars that are set for an email address will be used as the user’s avatar on Discourse.

7 Likes

An alternative I guess is to just severely limit the file size of uploads. If disk space is your main concern and not some other reason for limiting uploads, I’d recommend it. I’m on the $5 DO too and am not limiting uploads - plenty of space, esp when keeping backups elsewhere.

3 Likes

Hmm… Asking users to sign up to another service just for displaying avatars is not feasible I guess. But thanks v.much for your reply / suggestion.

I think I will go with your suggestion of restricting file size of uploads (though I think Discourse should have the option I wanted in-built). Thanks v.much for your reply / suggestion.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.