Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

sizeLimit setting is not working in htmlsmartimage dialog

Avatar

Level 4

Hello.

Occasionally users of page properties dialog in the classic UI in AEM6.1 will upload very large images using the html5smartimage [1] to the Image tab. The images can be so large that they cannot render or be processed, and also breaks the users' ability to "clear" the image (tool bar is grayed out). We need to use sizeLimit, but it is not working. When changing the xtype to the deprecated smartimage, there is file size validation. But using the deprecated smartimage xtype introduces other problems, so I think we should use html5smartimage if it uses sizeLimit. For testing, I set it to 1MB (see below), but it clearly accepts and stores any sized image with this configuration. Any help would be very appreciated.

 

                   <image jcr:primaryType="cq:Widget"
                       xtype="html5smartimage"
                        sizeLimit="1"
                       cropParameter="./image/imageCrop"
                       ddGroups="[media]"
                       fileNameParameter="./image/fileName"
                       fileReferenceParameter="./image/fileReference"               
                       name="./image/file"
                       requestSuffix="/image.img.png"
                       rotateParameter="./image/imageRotate"                       
                       title="Image"
                       disableZoom="true"
                       height="{Long}300">
                       <cropConfig jcr:primaryType="nt:unstructured">
                            <aspectRatios jcr:primaryType="cq:WidgetCollection">
                                <aspect43
                                    jcr:primaryType="nt:unstructured"
                                    checked="true"
                                    text="4 x 3"
                                    value="4,3"/>
                            </aspectRatios>
                        </cropConfig>
                   </image>     

[1] https://docs.adobe.com/docs/en/aem/6-1/ref/widgets-api/?class=CQ.form.SmartImage

Alternatively, if you know how we can have toolbar with a 'clear' button that always works (e.g. does not disappear or become disabled) that too would help

3 Replies

Avatar

Administrator

Hi,

To set the DAM File limit on Size, Please refer to:

Link:- 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:-

    In AEM, touch Tools > CRXDE Lite.
    In the CRXDE Lite page, in the directory window on the left, navigate to /jcr_root/apps/dam.
    You may need to touch the >> icon to see the directory window.
    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).
    When you are finished creating the node, the full path appears as the following:
    /jcr_root/apps/dam/gui/content/assets/_jcr_content/body/assetscontent/header/items/items/fileupload
    Select the fileupload node, then in the Properties tab, enter the following property value:
    {sizeLimit : "32212254720"}
    “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.
    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

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

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

 

This is the way to configure the limit of assets.

I hope this will solve your problem.

~kautuk



Kautuk Sahni

Avatar

Level 1

Hi,

I'm working on this issue with Chris. 

Thanks for your reply, but Chris is asking about using images that are uploaded to a Page directly through the Page Properties dialog using the component xtype "html5smartimage," this is not for uploading images to the DAM.

Currently it appears that when the "sizeLimit" property is set on the "html5smartimage" widget, it does not validate the image size on upload and will accept an image that is larger than the limit. Then, after reloading the page, the dialog section for uploading the image is blank and the buttons to "clear" or "crop" the image (that is larger than the sizeLimit) are greyed out. Perhaps this is a bug with AEM 6.1 and the "html5smartimage" xtype? Or are there additional properties that we should set to do size validation on upload?

Thanks for your time.

- Gerard