Skip to main content
jainamita
Dec 20, 2016 11:59 AM UTC
Solved

sizelimit on fileupload

I have a requirement to set size limit of 50KB on fileuplod of type image that i drag and drop from asset.I have tried sizeLimit property but it did not work,can someone help me on this.i found many examples to set restriction on dam asset but this requirement is component specific.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Dec 22, 2016 8:18 AM UTC

jainamita wrote...

Thanks for your reply but i am using drop-zone to drag & drop images and file-upload is disabled. (please see the attachment)

 

 

In that case i would suggest you to write a custom DAM workflow.

If you refer the OOB workflow 'DAM Update Asset' workflow, there you can configure which file types should be allowed. Similarly, you can write custom workflowprocess service to check the type and size of the asset and restrict the uploads accordingly.

Example of creating a custom workflow:- https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

// Creating custom AEM workflow steps that send email messages

You can create this for your use-case as well.

~kautuk

Kautuk Sahni

4 replies

smacdonald2008
Level 10
Dec 20, 2016 6:12 PM UTC

If you want a size limit for a specific component - then write a custom sling servlet that handles the upload of the content. Before placing the content into the JCR - check to see if the size of the asset. If its too big - reject it.  

Translate
kautuk_sahni
Level 9
Dec 21, 2016 7:16 AM UTC

Hi 

Please have a look at the suggestions from my AEM experts on similar question :

Link:-  http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__ibof-we_have_a_requiremen.html

// Restrict file uploads by size & type in DAM upload dialog  

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

    Or

    You could create a custom sling servlet, that will upload assets for you. There you can insert you logic to restrict anything.

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

 

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__nciy-hi_i_have_arequ.html

// DAM limit file size

 

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__bepz-hi_i_got_theref.html

// AEM TOUCH UI Restrict Large or Small Files Upload

 

I hope this would help you.

~kautuk

Translate
Kautuk Sahni
jainamita
jainamitaAuthor
Dec 21, 2016 9:53 AM UTC

Thanks for your reply but i am using drop-zone to drag & drop images and file-upload is disabled. (please see the attachment)

Translate
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Dec 22, 2016 8:18 AM UTC

jainamita wrote...

Thanks for your reply but i am using drop-zone to drag & drop images and file-upload is disabled. (please see the attachment)

 

 

In that case i would suggest you to write a custom DAM workflow.

If you refer the OOB workflow 'DAM Update Asset' workflow, there you can configure which file types should be allowed. Similarly, you can write custom workflowprocess service to check the type and size of the asset and restrict the uploads accordingly.

Example of creating a custom workflow:- https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

// Creating custom AEM workflow steps that send email messages

You can create this for your use-case as well.

~kautuk

Translate
Kautuk Sahni