Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/cookbook/file-picker-and-uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ When dialog is closed `FilePicker.on_result` event handler is called which event
* `path` - "Save file" and "Get directory" dialogs, a full path to a file or directory or `None` if dialog was cancelled.

```python
import flet as ft

def on_dialog_result(e: ft.FilePickerResultEvent):
print("Selected files:", e.files)
print("Selected file or directory:", e.path)

file_picker = ft.FilePicker(on_result=on_dialog_result)
selected_file = file_picker.on_result=file_selection
```

The last result is always available in `FilePicker.result` property.
Expand Down