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

How to decline image upload when the size of the image is more than the expected?

Avatar

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Srinin
Level 2

05-08-2016

Hi,

I want to stop the image upload and show an alert message to the author when the image size is more than certain number?

thanks

Srini

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

05-08-2016

Write a custom Sling Servlet that uploads DAM Assets. In the Sling Servlet - use the Asset Manager API. You have full control and if the asset is larger than you want, you can prevent it from going into the DAM. See this article on how to use Asset Manager API: 

https://helpx.adobe.com/experience-manager/using/uploading-files-aem1.html

Hope this helps... 

Answers (2)

Answers (2)

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,168 likes

Total Posts

6,294 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,168 likes

Total Posts

6,294 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

07-08-2016

Hi 

Also have a look at this old forum thread :- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

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

 

Another Old post:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//

Yes, we can configure the Size limit of the assets.

Please find below the way of doing so:-

  1. In AEM, touch Tools > CRXDE Lite.
  2. In the CRXDE Lite page, in the directory window on the left, navigate to /jcr_root/apps/dam.
  3. You may need to touch the >> icon to see the directory window.
  4. In the /jcr_root/apps/dam folder, use the Create(if not present) drop-down list to create a node with the following directory structure:
    /gui/content/assets/_jcr_content/body/assetscontent/header/items/items/fileupload (it may be already present).
  5. When you are finished creating the node, the full path appears as the following:
  6. /jcr_root/apps/dam/gui/content/assets/_jcr_content/body/assetscontent/header/items/items/fileupload
  7. Select the fileupload node, then in the Properties tab, enter the following property value:
  8. {sizeLimit : "32212254720"}
  9. “chunkUploadMinFileSize property”:- The size above which an asset is considered a large asset.  You can configure the system to consider assets above 30 Mb (instead of 50 Mb) in size as large assets. In other words, the progress bar appears when assets above 30 Mb in size are uploaded.
  10. In the upper-left of the CRXDE Lite page, touch Save All.

 

Reference Links

1. https://docs.adobe.com/docs/en/aem/6-0/author/assets/managing-assets-touch-ui/managing-video-assets....

2. https://docs.adobe.com/docs/en/aem/6-1/author/assets/managing-assets-touch-ui.html

 

This is the way to configure the limit of assets.

I hope this will solve your problem.

 

Thanks and Regards

Kautuk Sahni

Avatar

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Srinin
Level 2

05-08-2016

Thanks for quick reply!