|
class ServeFileView(View, SingleObjectMixin): |
should be changed to use FileResponse: https://docs.djangoproject.com/en/2.2/ref/request-response/#fileresponse-objects
Until rather recently FileResponse was slightly suboptimal and did not fill out the content-length field. In Django 2.1 it learned that too.