class documentation

class FileResponse(StreamingHttpResponse):

View In Hierarchy

A streaming HTTP response class optimized for files.
Method set​_headers Set some common response headers (Content-Length, Content-Type, and Content-Disposition) based on the filelike response content.
Method __init__ Undocumented
Method ​_set​_streaming​_content Undocumented
Class Variable block​_size Undocumented
Instance Variable as​_attachment Undocumented
Instance Variable file​_to​_stream Undocumented
Instance Variable filename Undocumented

Inherited from StreamingHttpResponse:

Class Variable streaming Undocumented
Method __iter__ Undocumented
Method __repr__ Undocumented
Method getvalue Undocumented
Method streaming​_content.setter Undocumented
Instance Variable ​_iterator Undocumented
Property content Undocumented
Property streaming​_content Undocumented

Inherited from HttpResponseBase (via StreamingHttpResponse):

Method __delitem__ Undocumented
Method __getitem__ Undocumented
Method __setitem__ Undocumented
Method charset.setter Undocumented
Method close Undocumented
Method delete​_cookie Undocumented
Method flush Undocumented
Method get Undocumented
Method has​_header Case-insensitive check for a header.
Method items Undocumented
Method make​_bytes Turn a value into a bytestring encoded in the output charset.
Method readable Undocumented
Method reason​_phrase.setter Undocumented
Method seekable Undocumented
Method serialize​_headers HTTP headers as a bytestring.
Method set​_cookie Set a cookie.
Method set​_signed​_cookie Undocumented
Method setdefault Set a header unless it has already been set.
Method tell Undocumented
Method writable Undocumented
Method write Undocumented
Method writelines Undocumented
Instance Variable ​_charset Undocumented
Instance Variable ​_handler​_class Undocumented
Instance Variable ​_reason​_phrase Undocumented
Instance Variable ​_resource​_closers Undocumented
Instance Variable closed Undocumented
Instance Variable cookies Undocumented
Instance Variable headers Undocumented
Instance Variable status​_code Undocumented
Property ​_content​_type​_for​_repr Undocumented
Property charset Undocumented
Property reason​_phrase Undocumented
def set_headers(self, filelike):
Set some common response headers (Content-Length, Content-Type, and Content-Disposition) based on the filelike response content.
def __init__(self, *args, as_attachment=False, filename='', **kwargs):
def _set_streaming_content(self, value):
block_size: int =

Undocumented

as_attachment =

Undocumented

file_to_stream =

Undocumented

filename =

Undocumented