Browser hangs when opening large json files

After upgrade to Gitlab CE 15.4 (from 15.0), opening a large json file (2.18 MiB) in the repository, causes the browser tab to hang on weaker computers. Is there any option to display a message to download such a file instead of trying to open it?