quart.datastructures module

class quart.datastructures.FileStorage(stream: Optional[BinaryIO] = None, filename: Optional[str] = None, name: Optional[str] = None, content_type: Optional[str] = None, content_length: Optional[int] = None, headers: Optional[werkzeug.datastructures.Headers] = None)

Bases: werkzeug.datastructures.FileStorage

A thin wrapper over incoming files.

async load(source: os.PathLike, buffer_size: int = 16384)None
async save(destination: os.PathLike, 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 to keep in memory.