I generate an .odt file in a flask app using something like :
return send_file( # imported from flask
BytesIO(data), # importe from stdlib
attachment_filename=filename,
as_attachment=True
)
On my machine with Ubuntu using either Firefox or Chromium, I download the file fine. It opens like a breathe.
On another machine, on the same wired network but using a corporate windows setup and still Firefox, the file is missing bytes. The file size varies from download to download without any clear pattern, and is about 100/200ko smaller.
I tried with curl on said machine, and got the same results with missing bytes.
The server is a python 3.6 flask 0.12 powered website on a debian with gunicorn + nginx.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…