Basically that is a task exact copy of T153862 but about File namespace and with a prerequisite of T153864 being done so that there are actually error messages to be shown.
Currently on Commons there's already an error message like this present being provided by title-blacklist (perhaps there are also such in other wikis):
https://commons.wikimedia.org/w/index.php?title=File:Example&action=edit