mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 07:05:50 +01:00
* feat(v3): add file-input example for issue #4862 Minimal example demonstrating HTML file input functionality: - Single file selection - Multiple file selection - Files or directories (webkitdirectory) - Accept filter (note: not enforced by macOS) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor(example): use JS runtime dialog API instead of Go backend Update file-input example to use wails.Dialogs.OpenFile() from the JS runtime instead of a custom Go FileService backend. This demonstrates the recommended approach for dialog functionality. Fixes #4862 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor(example): use generated bindings for dialog API Update file-input example to use proper generated bindings instead of inline JS runtime calls. The example now demonstrates: - HTML file input elements (single, multiple, webkitdirectory) - Wails Dialog API via generated FileService bindings Fixes #4862 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: add changelog entry for macOS file input fix Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| assets | ||
| main.go | ||
| README.md | ||
File Input Example
Tests HTML <input type="file"> and Wails Dialog API functionality (#4862).
Test Cases
HTML File Input:
- Single File - Basic file selection
- Multiple Files - Multi-select with
multipleattribute - Files or Directories - Selection with
webkitdirectoryattribute
Wails Dialog API (via generated bindings):
4. Directory Only - CanChooseDirectories(true) + CanChooseFiles(false)
5. Filtered (.txt) - Using AddFilter() for file type filtering
Run
# Generate bindings (already included)
wails3 generate bindings -d assets/bindings
# Run the app
go run .