Mattermost, Inc.

Restrict only certain files, or no files?

Curious if there is a way that we can restrict only certain file types to be attached to messages? What I am trying to prevent our mattermost from becoming a huge document repository…

Or, is it possible to only allow storage of profile photos and nothing else?

Thanks!

Hi @Wintrmte, it is not currently possible to restrict file types. However, there is an option in the System Console > FILES > Storage section to limit the Maximum File Size of attachments, which may prevent users from storing large files on your Mattermoat server.

Please consider opening a feature idea on restricting file types, this will allow the community to discuss and upvote!

Can the Maximum File Size be set to zero to restrict any file uploads?

@vamailbox no, currently the input for this value must be a positive whole number (minimum = 1). Thanks for question, I will update the documentation and error message to make this clear.

Just an update for anyone finding this via search: The ability to disable file uploads was added last year (v3.9+).
https://docs.mattermost.com/administration/config-settings.html#allow-file-sharing

It’s not yet possible to disable it for only certain file types, if that’s needed by anyone please consider opening a feature request for it.

Feature request here : https://mattermost.uservoice.com/forums/306457-general/suggestions/35432632-restrict-attachments-by-file-type