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).