class documentation

class FileUpload(object): (source)

View In Hierarchy

Undocumented

Method __init__ Wrapper for file uploads.
Method get_header Return the value of a header within the mulripart part.
Method save Save file to disk or copy its content to an open file(-like) object. If *destination* is a directory, :attr:`filename` is added to the path. Existing files are not overwritten by default (IOError).
Class Variable content_length Undocumented
Class Variable content_type Undocumented
Instance Variable file Undocumented
Instance Variable headers Undocumented
Instance Variable name Undocumented
Instance Variable raw_filename Undocumented
Property filename Name of the file on the client file system, but normalized to ensure file system compatibility. An empty filename is returned as 'empty'.
Method _copy_file Undocumented
def __init__(self, fileobj, name, filename, headers=None): (source)

Wrapper for file uploads.

def get_header(self, name, default=None): (source)

Return the value of a header within the mulripart part.

def save(self, destination, overwrite=False, chunk_size=2**16): (source)

Save file to disk or copy its content to an open file(-like) object. If *destination* is a directory, :attr:`filename` is added to the path. Existing files are not overwritten by default (IOError). :param destination: File path, directory or file(-like) object. :param overwrite: If True, replace existing files. (default: False) :param chunk_size: Bytes to read at a time. (default: 64kb)

content_length = (source)

Undocumented

content_type = (source)

Undocumented

Undocumented

Undocumented

Undocumented

raw_filename = (source)

Undocumented

Name of the file on the client file system, but normalized to ensure file system compatibility. An empty filename is returned as 'empty'. Only ASCII letters, digits, dashes, underscores and dots are allowed in the final filename. Accents are removed, if possible. Whitespace is replaced by a single dash. Leading or tailing dots or dashes are removed. The filename is limited to 255 characters.

def _copy_file(self, fp, chunk_size=2**16): (source)

Undocumented