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
BedrockMission!

Learn More

View all

Sign in to view all badges

Limiting uploads by size at folder level in AEM Assets

Avatar

Avatar
Validate 1
Level 2
harishred
Level 2

Likes

2 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
harishred
Level 2

Likes

2 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
harishred
Level 2

03-02-2021

Hello! we have a requirement where we have to limit uploads by size at folder level. Like one folder can have max 20mb, where other can only take 10mb. Is it possible via configuration. If not any ideas/suggestions on this requirement?

 

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct Reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct Reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile
raj_mandalapu
MVP

03-02-2021

Hi Harish,

 

If you want to set up the size limit for the entire assets folder then you can refer to OOTB configuration,

https://experienceleague.adobe.com/docs/experience-manager-64/assets/managing/managing-video-assets....

 

But, in your case it is not, you need to set it up at the folder level, you can try the below approaches.

 

1. workflow process

Create a separate workflow process step and in the execute method get the file size either by reading the metadata of the file or reading the size of inputStream, etc, if it crosses a certain amount then you can stop uploading the Asset.

You need to add this in the "DAM Asset Upload" workflow.

 

2. If you are going to upload Asset via component, file upload field, then you need to write a custom servlet. you will have full control here.

 

3. We can handle this via Javascript, but it requires some investigation and also must have front end knowledge, check below link only to get some idea, it is not actual solution

http://experience-aem.blogspot.com/2020/04/aem-6540-show-file-size-in-units-in-asset-metadata-editor...

 

 

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Establish
MVP
Ravi_Pampana
MVP

Likes

192 likes

Total Posts

243 posts

Correct Reply

74 solutions
Top badges earned
Establish
Contributor
Shape 1
Ignite 5
Ignite 3
View profile

Avatar
Establish
MVP
Ravi_Pampana
MVP

Likes

192 likes

Total Posts

243 posts

Correct Reply

74 solutions
Top badges earned
Establish
Contributor
Shape 1
Ignite 5
Ignite 3
View profile
Ravi_Pampana
MVP

03-02-2021

Hi,

 

Try to add a Custom Process Step in "Dam Upload Asset" (/libs/cq/workflow/content/console.html) workflow which checks the size of uploaded image and allowed size for the folder and continue if satisfies or stop the upload process

 

Hope this helps!