Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Exclude file type in DAM

Avatar

Level 2

Hello,

For security reasons, we don't want to let an author upload some file types (.exe, .js for example)

How can we do that in AEM ?

 

Thansk a lot

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

I don't know whether there is any OOTB configuration to limit the file types. But there is a community article for restricting the upload based on size of the file - http://experience-aem.blogspot.com/2014/12/aem-6-sp1-classic-ui-restrict-large-or-small-files-upload.... You can customize it and add your logic of checking the file types. You can either just check the file extensions in the javascript or invoke a backend servlet to check the file headers for the mime types. Also, this is limited to Classic UI only. 

View solution in original post

4 Replies

Avatar

Level 4

Adobe hotfix (71519) resolves the issue. You can configure the specified MIME type you want to allow in felix console.

Avatar

Correct answer by
Employee Advisor

I don't know whether there is any OOTB configuration to limit the file types. But there is a community article for restricting the upload based on size of the file - http://experience-aem.blogspot.com/2014/12/aem-6-sp1-classic-ui-restrict-large-or-small-files-upload.... You can customize it and add your logic of checking the file types. You can either just check the file extensions in the javascript or invoke a backend servlet to check the file headers for the mime types. Also, this is limited to Classic UI only. 

Avatar

Level 10

YOu can write a DAM handler and have control over the file type.  WHen writing a DAM handler - you use this API: 

https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/day/cq/dam/commons/handler/AbstractAssetHandler....

See: 

https://helpx.adobe.com/experience-manager/using/damhandler.html

Using a DAM handler - you can get mime type.

Avatar

Level 2

Hello,

 

I have the same request, but I don't find how to use your trick.

I need to help AEM skipping the upload of "Thumbs.db" files which are killing my webdav mount when AEM try to store it.

Many thanks