Region a user can drop a file into for file uploading.
@solara.component def FileDrop( label="Drop file here", on_total_progress: Optional[Callable[[float], None]] = None, on_file: Optional[Callable[[FileInfo], None]] = None, lazy: bool = True, ): ...
If lazy=True, no file content will be loaded into memory,
nor will any data be transferred by default.
A file object is passed to the
on_file callback, and data will be transferred
If lazy=False, the file content will be loaded into memory and passed to the
on_file callback via the
The on_file callback takes the following argument type:
class FileInfo(typing.TypedDict): name: str # file name size: int # file size in bytes file_obj: typing.BinaryIO data: Optional[bytes]: bytes # only present if lazy=False
on_total_progress: Will be called with the progress in % of the file upload.
on_file: Will be called with a
FileInfoobject, which contains the file
lazy: Whether to load the file content into memory or not. If
False, the file content will be loaded into memory and passed to the
on_filecallback via the