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.

restrict size of pdf while uploading in dam

Avatar

Level 4

I want to throw error , if author is uploading pdf more than 2 mb inside dam.

File type only on pdf .  it should allow image and video more than 2 mb 

 

@arunpatidar @Asutosh_Jena_ @

 
3 Replies

Avatar

Community Advisor

Hi @raushan123 

 

Did you check the below article?

http://experience-aem.blogspot.com/2014/12/aem-6-sp1-classic-ui-restrict-large-or-small-files-upload...

 

It has the implementation to restrict specific file type with 2 Mb limit.

 

Here is another approach with filter to restrict. You can apply for specific file type as well.

http://experience-aem.blogspot.com/2018/11/aem-6420-file-decode-filter-virus-scan-to-decode-uploaded...

 

Let us know if you are looking for something else.

 

Thanks!