FileField

class FileField

A field for rendering a file input.

FileField(
    *,
    required: bool = True,
    default: Any = None,
    messages: dict[str, str] | None = None
)

Bases: Field

This field does not perform any processing or uploading.

Your web framework typically doesn't even make the file data available in the request object, just the filename(s), so you are responsible for handling the uploaded file data in the view/controller that processes the form submission.