MikeJones there are two possible errors for a file too large:
The first is your webserver blocking the request if the file is bigger than PHP configured max upload.
The second is fof/upload checking the size of the file and returning a translated message. But this only happens if the first test by PHP passes, otherwise Flarum never actually loads.
If the webserver returned a special status code for failed file uploads, we could show a special message client-side in the extension. But I think most servers will return a generic 500 page so we have no way of knowing what went wrong and just display the default Flarum error message.
Technically, you should be able to configure PHP in a way that it returns a JSON payload in JSON:API syntax to describe the error. But I've never tried to do that. I'm not whether it's possible to define an error page specifically for files too large.
I suppose we should also be able to do a client-side file size check before actually triggering the file upload. If someone knows how to do that, a PR is welcome 🙂