Expand my Community achievements bar.

SOLVED

Customize Error Alert when the size exceeds the permissible limit in AEM forms file Attachment

Avatar

Level 4

Hi All,

 

We are using File Attachment Component and have configured the maximum size of 1MB for an attachment.

 

The alert provided is OOTB when the size of the file exceeds 1 MB.

How can we restrict the Alert from coming and customize to our error Message.

 

This js is called ootb and we need to restrict it.

 

 

 

 

Sb2512_0-1684328262700.png

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Sb2512 :

You can check in the below file and change the error message . This message is under i18n and it is language specific for different countries. 

you can change this under en_Us and you can see the change in the alert message.

 

/libs/fd/xfaforms/clientlibs/I18N/en_US/I18N.js 

"FileSizeGreater" : "Files {0} are greater than the expected size: {1}MB.",

{0} : will be replcaed by the name of the file which you uploaded.

{1} : will be replaced by the max file size limit you configured.

 

if it didnot work, check if you have done any overlay of these files under /apps/fd/xfaforms/clientlibs/I18N/. if yes, you need to make changes under /apps/.

 

which i have already tested and working fine. if there is any issue let me know.

 

 

Thanks ,

Siva

 

Thanks,
Siva

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

@Sb2512 :

You can check in the below file and change the error message . This message is under i18n and it is language specific for different countries. 

you can change this under en_Us and you can see the change in the alert message.

 

/libs/fd/xfaforms/clientlibs/I18N/en_US/I18N.js 

"FileSizeGreater" : "Files {0} are greater than the expected size: {1}MB.",

{0} : will be replcaed by the name of the file which you uploaded.

{1} : will be replaced by the max file size limit you configured.

 

if it didnot work, check if you have done any overlay of these files under /apps/fd/xfaforms/clientlibs/I18N/. if yes, you need to make changes under /apps/.

 

which i have already tested and working fine. if there is any issue let me know.

 

 

Thanks ,

Siva

 

Thanks,
Siva