コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

sizelimit on fileupload

Avatar

Level 1

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.

1 受け入れられたソリューション

Avatar

正解者
Administrator

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 返信

Avatar

Level 10

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.  

Avatar

Administrator

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

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

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

// DAM limit file size

 

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

// AEM TOUCH UI Restrict Large or Small Files Upload

 

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Level 1

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

Avatar

正解者
Administrator

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