Skip to content

FilePickerUploadFile

由 FilePicker 选中的单个文件的上传描述符。

实例会被传入 upload。上传时,Flet 首先按 id 解析所选文件;当 id 缺失或找不到时,再回退到 name。

id 与 name 中至少应提供其一。

属性 ​

名称类型默认值说明
upload_urlstrrequiredUpload destination URL. Can be an absolute URL or a page-relative URL returned by get_upload_url.
methodstr'PUT'HTTP method used for the upload request, usually PUT or POST.
idOptional[int]NoneSelected file identifier returned by pick_files. This is the preferred lookup key when both id and name are specified.
nameOptional[str]NoneSelected file name used as fallback lookup when id is missing or does not match any currently selected file.

关注我,学习大模型、大数据、Python等热门技术。