主题
FilePickerUploadFile
由 FilePicker 选中的单个文件的上传描述符。
实例会被传入 upload。上传时,Flet 首先按 id 解析所选文件;当 id 缺失或找不到时,再回退到 name。
id 与 name 中至少应提供其一。
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
upload_url | str | required | Upload destination URL. Can be an absolute URL or a page-relative URL returned by get_upload_url. |
method | str | 'PUT' | HTTP method used for the upload request, usually PUT or POST. |
id | Optional[int] | None | Selected file identifier returned by pick_files. This is the preferred lookup key when both id and name are specified. |
name | Optional[str] | None | Selected file name used as fallback lookup when id is missing or does not match any currently selected file. |