[bug] Can't filter files type with 'Dialog' Plugin or input(type="file") element in macOS(safari?)
Closed this issue · 1 comments
GoCoder7 commented
Describe the bug
Hi, thanks for this amazing Framework!
I wanted to filter files by extensions when selecting files but
In Select(Open)ing files with native system dialog with tauri (in MacOS),
it does not apply any filtering aspect in system dialog with Dialog plugin and <input type="file" accept=".xlsx, .pdf">
I've tested it with frontent 'sveltekit' and 'vanilajs', and in both, the filtering didn't worked
(which means it shows every files in that folder)
I haven't tested it in Windows yet
but after testing i will update this issue
thanks!
Reproduction
- in macOS, use 'open' function in Dialog plugin or use
<input>
element with 'type="path" accept=".xslx, .pdf"' attributes - try to open 'file selecting dialog' by activating above
Expected behavior
it should filter
Full tauri info
output
[✔] Environment
- OS: Mac OS 15.0.1 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 22.10.0
- pnpm: 9.10.0
- yarn: 1.22.19
- npm: 10.9.0
[-] Packages
- tauri 🦀: 2.0.6
- tauri-build 🦀: 2.0.2
- wry 🦀: 0.46.3
- tao 🦀: 0.30.3
- tauri-cli 🦀: 1.6.1
- @tauri-apps/api : not installed!
- @tauri-apps/cli : 2.0.5
[-] Plugins
- tauri-plugin-shell 🦀: 2.0.2
- @tauri-apps/plugin-shell : not installed!
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- bundler: Vite
Stack trace
-
Additional context
No response
GoCoder7 commented
it works with plugin 'Dialog' well