Document toolboxDocument toolbox

Restrict attachments by file type

Attachment Checker allows admin to restrict the types of attachment uploaded through File Type Blocking.


2 layers of filter

The file type blocking consist of the extension check and mime type check.

Extension check is based on the filename of the attachment. For example, if filename is myAttachment.jpg, the extension will be jpg.

Mime type check is based on the contents of the attachment. It prevents the bypass of extension check by renaming or removing the extension.

Apache Tika is used to detect the mime type of the attachment uploaded.

Refer to Supported Document Formats to find out which file types are supported.


2 filter modes

Attachments can be filtered based on:

  • Allow List → Only file types listed are allowed to be uploaded

  • Deny List → Only file types listed are blocked from being uploaded

Allow List

Deny List

Allow List

Deny List

For example, extensions is configured to: jpg, png

Only the following files will be allowed:

jpg, jpeg, jpe, jif, jfif, jfi, png

For example, extensions is configured to: exe

Only the following files will be blocked:

exe, dll, com


Recommended file types

You can use the following list of extensions:

gif, jpg, png, txt, log, xml, doc, docx, xls, xlsx, ppt, pptx, pdf
  • Images: gif, jpg, png

  • Text files: txt, log, xml

  • Office documents: doc, docx, xls, xlsx, ppt, pptx, pdf