Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

restrict size of pdf while uploading in dam

raushan123
Level 1
Level 1

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 

 

@Arun_Patidar @Asutosh_Jena_ @

 
3 Replies
Asutosh_Jena_
Community Advisor
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!