Skip to content

ServefileView should use FileResponse upon Django 2.2 upgrade #329

@vikoivun

Description

@vikoivun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions