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

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

Mark Solution

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

解決済み

AEM Coral UI FileUpload | Issue when empty file was uploaded on valid file

Avatar

Level 2

Hi All,

We have a requirement where we are allow author to upload a file from their local system in AEM. For this we are using OOTB AEM /libs/cq/gui/components/authoring/dialog/fileupload.

It worked fine when their is no file selected previously and author tries to upload a empty file in authoring instance. AEM validate the file and doesn't upload it in the JCR. No node created for it.

 

Where as in case when author first selected a valid file with data in it and on top it upload an empty file (0 KB). In this scenario AEM is not validating the empty file and allow the author to upload it. 

But in corresponding JCR node the old file with data still attached.

 

So just want to understand how AEM validate the empty file and is their any way we can restrict the Author to upload empty file in second scenario as well.

 

Thanks in advance.

Regards,

Shikha

 

 

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

Avatar

正解者
Level 4

Hi @sharms13 ,

 

You can overlay this component and update the file: http://<IP>:<Port>/libs/cq/gui/components/authoring/dialog/fileupload/render.jsp

 

You can have a check for the size of doc at the time of upload and accordingly can intimate the Author at the time of upload(may be by an alert).

 

 

Thanks!

元の投稿で解決策を見る

2 返信

Avatar

正解者
Level 4

Hi @sharms13 ,

 

You can overlay this component and update the file: http://<IP>:<Port>/libs/cq/gui/components/authoring/dialog/fileupload/render.jsp

 

You can have a check for the size of doc at the time of upload and accordingly can intimate the Author at the time of upload(may be by an alert).

 

 

Thanks!

Avatar

Community Advisor

Hi @sharms13 ,

               Write validation logic in  js and add property name validation  to the particular field.whenever you have selected file it will validate is it empty file or not .

Kr,

Sanjay