Why does sizeLimit not working in AEM while dragging file from asset? | Community
Skip to main content
Level 2
December 13, 2022
Question

Why does sizeLimit not working in AEM while dragging file from asset?

  • December 13, 2022
  • 2 replies
  • 1004 views

I'm trying to implement sizeLimit in cq:dialog of component. But sizeLimit is working only while I upload a file. It's not working while I drag a file from asset. Can I apply sizeLimit while dragging file from asset?

 

 

<file
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
sizeLimit="100"
autoStart="{Boolean}false"
class="cq-droptarget"
fileNameParameter="./fileName"
fileReferenceParameter="./fileReference"
mimeTypes="[image/gif,image/jpeg,image/png,image/webp,image/tiff,image/svg+xml]"
multiple="{Boolean}false"
name="./file"
title="Upload Image Asset"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Jagadeesh_Prakash
Community Advisor
Community Advisor
December 13, 2022

@rosudel  Similar requirement is asked in below URL

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/sizelimit-on-fileupload/m-p/199486

 

You can follow the suggestion given by @kautuk_sahni 

HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 13, 2022

you need to write a custom sling servlet that handles the upload of the asset. Before placing the content into the JCR - check to see if the size of the asset is according to your requirement. If not then reject it.  

rosudelAuthor
Level 2
December 13, 2022

So sizeLimit = " 100000" can't be implemented while dragging file from asset to component?