Exclude file type in DAM | Community
Skip to main content
New Participant
October 16, 2015
Solved

Exclude file type in DAM

  • October 16, 2015
  • 4 replies
  • 1923 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kunal_Gaba_

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.html. 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. 

4 replies

New Participant
May 27, 2016

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

New Participant
October 16, 2015

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

Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Participant
October 16, 2015

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.html. 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. 

smacdonald2008
New Participant
October 16, 2015

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.html

See: 

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

Using a DAM handler - you can get mime type.