quart.datastructures module¶
-
class
quart.datastructures.FileStorage(stream: Optional[BinaryIO] = None, filename: Optional[str] = None, name: Optional[str] = None, content_type: Optional[str] = None, headers: Optional[Dict] = None)¶ Bases:
objectA thin wrapper over incoming files.
-
close() → None¶
-
property
content_length¶ The content-length sent in the header.
-
property
content_type¶ The content-type sent in the header.
-
property
mimetype¶ Returns the mimetype parsed from the Content-Type header.
-
property
mimetype_params¶ Returns the params parsed from the Content-Type header.
-
save(destination: BinaryIO, buffer_size: int = 16384) → None¶ Save the file to the destination.
- Parameters
destination – A filename (str) or file object to write to.
buffer_size – Buffer size as used as length in
shutil.copyfileobj().
-