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.
Solved! Go to Solution.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Hi
Please have a look at the suggestions from my AEM experts on similar question :
// Restrict file uploads by size & type in DAM upload dialog
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
// DAM limit file size
// AEM TOUCH UI Restrict Large or Small Files Upload
I hope this would help you.
~kautuk
Views
Replies
Total Likes
Thanks for your reply but i am using drop-zone to drag & drop images and file-upload is disabled. (please see the attachment)
Views
Replies
Total Likes
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
Views
Replies
Total Likes