Nbviewer truncating notebooks size grater than 128 KB

Hi All,

We are running into an issue where a .ipynb notebook file downloaded in nbviewer (using Download menu icon) is truncating off cells in downloaded notebook file. The original file size is 178 KB, but the downloaded file size if 128 KB. Is there any file size limit for nbviewer download functionality?

Opened an issue in nbviewer - https://github.com/jupyter/nbviewer/issues/934

Looked at the source code for nbviewer and I think I found the .py file which handles the notebook download functionality. The file - https://github.com/jupyter/nbviewer/blob/5ddcfbc37e10ee9ccda5ef52b6ff1e36418d5338/nbviewer/providers/local/handlers.py has “async def download()” which has the logic for download functionality of file, where os.stat(filename) is used and returns “stat_result” object which has an attribute “st_size”, which gives file size in bytes. In our case, it is showing as 178986 bytes (178 KB) which is the correct notebook file size.

Any help would be appreciated.
@minrk @mpacer and other nbviewer maintainer/users