ftSizeLimit for Images - customizing error message

#1

Is there a way to customize the error message from uploading an image larger than the limit listed in ftSizeLimit ? Currently, the message is

youimage.jpg is not within the file size limit of 0MB

I tried using the ftErrorSizeMessage attribute that the file formtool uses, but that did not work.

Thanks,

  • JR
0 Likes

#2

You’re right, this error message string is currently hard coded, with the filename and file size limit being dynamically evaluated;

What type of customisation do you need to do to this string, are you trying to provide a translation or just change the message entirely? If we add it to the resource bundles it could be overridable and still dynamic.

(Side note: the file formtool error message should be added to the resource bundles to be able to provide translations as well, and the messages in both formtools probably should be similar / consistent).

0 Likes