(self, fileobj, name, filename, headers=None)
Wrapper for file uploads.
Wrapper for file uploads.
Wrapper for file uploads .
def __init__(self, fileobj, name, filename, headers=None):
        ''' Wrapper for file uploads. '''
        #: Open file(-like) object (BytesIO buffer or temporary file)
        self.file = fileobj
        #: Name of the upload form field
        self.name = name
        #: Raw filename as sent by the client (may contain unsafe characters)
        self.raw_filename = filename
        #: A :class:`HeaderDict` with additional headers (e.g. content-type)
        self.headers = HeaderDict(headers) if headers else HeaderDict()
def __init__ ( self , fileobj , name , filename , headers = None ) : #: Open file(-like) object (BytesIO buffer or temporary file) self . file = fileobj #: Name of the upload form field self . name = name #: Raw filename as sent by the client (may contain unsafe characters) self . raw_filename = filename #: A :class:`HeaderDict` with additional headers (e.g. content-type) self . headers = HeaderDict ( headers ) if headers else HeaderDict ( )