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

How to add custom rule for only pdf(s) that are uploaded shouldn't have special chars, space or caps and max size limited to 5mb?

Avatar

Level 2

I've tried by going to /apps/dam/gui/coral/components/commons/fileupload/clientlibs/fileupload/js/fileupload.js but the issue is it gets applied to all assets in general. But I want to add separate rules for PDF, and separate one for images.
Tried in the following manner:

ac6600_0-1650642344543.png

 

2 Replies

Avatar

Employee Advisor

Hi,

Welcome to AEM Community !!

Did you try creating a MIME type for apply that restrictions on file upload?

Just like this one : https://experienceleague.adobe.com/docs/experience-manager-65/assets/administer/configuring-asset-up...

Thanks,

Vikram Gaur

Avatar

Level 2

Hi Vikram,

 

Thanks for the heads-up. But in the link, what I could find is how to restrict type of files to upload in assets(.img , video etc.). My question was to limit the size of pdfs and images, and use custom rules for naming where it won't allow special chars, caps, and spacing. Also there will be separate set of rules for pdf and image.

 

I tried by navigating to /apps/dam/gui/coral/components/commons/fileupload/clientlibs/fileupload/js/fileupload.js and modified the code (shown in the image), but that gets to applied all assets in general.