File type not permitted or mime type does not match the file content

Manuel Torres
Tera Contributor

If you receive this error when trying to upload an attachment, it means that you have passed the extension file validation in the system property: glide.attachment.extensions but you are not passing the MIME validation (an extra security validation).

 

To solve that issue, you need to add this file type to "glide.security.mime_type.aliasset" property.

 

You must check the error in the logs  (you can filter by warning and message contains "mime" word). There you will see something like this:

MIME type mismatch for file: xxxx.xlsm . Expected type: application/vnd.ms-excel.sheet.macroenabled.12, Actual type: application/x-tika-ole-drm-encrypted"

 

You just need to add in "glide.security.mime_type.aliasset" the following value using type String:

application/x-tika-ole-drm-encrypted=application/vnd.ms-excel.sheet.macroenabled.12

 

This is an example, you can add more file types as you need cheking the logs and using comma.

 

Here some information about tika, it can be helpful:

https://tika.apache.org/2.4.1/formats.html 

 

0 REPLIES 0