Alfresco handles every file format, in fact there is no limitation out of the box in order to restrict allowed MIME types. Executables, databases and any other potentially harmful content can be stored inside.
Developers can control this feature easily by listening onCreateNode event from NodePolicy. However, system administrators and other users without this skill require a simpler way. Below this simple approach is described.
Create a new file at
Repository > Data Dictionary > Scripts named
exception.js including following contents:
throw "Unsupported file format";
Creating one rule by every forbidden mime type
Once this rule is working, users will receive an Unsupported file format message every time a binary file is uploaded by using Alfresco Share.
On the other hand, uploading binary files to this folder by any other means (WebDAV, FTP, email…) will produce also this error.
This type of content will not be uploaded to Alfresco in any case.
GitHub Addon – https://github.com/keensoft/alfresco-mimetype-blocker