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
Solved! Go to Solution.
Views
Replies
Total Likes
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!
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!
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
Views
Likes
Replies