Is there any option that prevents all forum users from downloading any contibo file on all topics?
You can disallow people from seeing the posts with category permissions, but if people can see the attachments they can download them since seeing and downloading are the same thing. Or perhaps I don’t understand the question.
I would like that when clicking on the file to download, it would appear some message informing that it is not possible to download, I do not know if this option exists, at least I did not find it.
No. The only way that I can think of would be to put those files elsewhere that enforce some kind of restriction and put that link in discourse.
In the context of civilized discussion, including things that people cannot see does not make much sense. (if you don’t want people to see the files, why put them there?)
There is an option to disallow anon users from downloading attachments, but that’s it. If a community member is logged in and can get the URL, they can download the file.
If you need more special file download permissions than that, use a file hosting service…
I can see a very specialized use case for forums doing support to allow customers to upload files that cause issues in a program without worry that non-staff will be able to access them. It’s certainly not for everyone, though.
I think that the Discourse solution for that is to send the uploaded file to
@somegroup as a personal message.