werkzeug.FileStorage

class werkzeug.FileStorage(stream=None, filename=None, name=None, content_type=None, content_length=None, headers=None)[source]

The FileStorage class is a thin wrapper over incoming files. It is used by the request object to represent uploaded files. All the attributes of the wrapper stream are proxied by the file storage so it’s possible to do storage.read() instead of the long form storage.stream.read().

Methods

__init__([stream, filename, name, ...])
close() Close the underlying file if possible.
save(dst[, buffer_size]) Save the file to a destination path or file object.

Attributes

content_length The content-length sent in the header.
content_type The content-type sent in the header.
mimetype Like content_type, but without parameters (eg, without charset, type etc.) and always lowercase.
mimetype_params The mimetype parameters as dict.