tauri-apps / tauri-apps/plugins-workspace
tauri-plugin-dialog return wrong path
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
### Describe the bug
eg
When using `tauri-plugin-dialog` on Android mobile devices, after selecting a file through the file picker, the obtained path starts with `content://` instead of returning an absolute file path. This causes subsequent file operations using `tauri-plugin-fs` APIs to fail with "no file" errors. The same code works correctly on desktop platforms.
zh
我认为他是一个bug,tauri-plugin-dialog 在pc上工作良好,但是在移动端例如安卓,选择的文件后获取的路径是以content开头的路径,而没有返回绝对路径,导致我使用其他的tauri-plugin-fs的api显示no file
### Reproduction
_No response_
### Expected behavior
_No response_
### Full `tauri info` output
```text
[✔] Environment
- OS: Windows 10.0.26100 x86_64 (X64)
✔ WebView2: 136.0.3240.92
✔ MSVC: Visual Studio 生成工具 2022
✔ rustc: 1.85.0 (4d91de4e4 2025-02-17)
✔ cargo: 1.85.0 (d73d2caf9 2024-12-31)
✔ rustup: 1.28.1 (f9edccde0 2025-03-05)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 22.14.0
- pnpm: 10.8.1
- npm: 10.9.2
[-] Packages
- tauri 🦀: 2.5.1
- tauri-build 🦀: 2.2.0
- wry 🦀: 0.51.2
- tao 🦀: 0.33.0
- @tauri-apps/api : 2.5.0
- @tauri-apps/cli : 2.5.0
[-] Plugins
- tauri-plugin-log 🦀: 2.4.0
- @tauri-apps/plugin-log : not installed!
- tauri-plugin-fs 🦀: 2.3.0
- @tauri-apps/plugin-fs : 2.3.0
- tauri-plugin-store 🦀: 2.2.0
- @tauri-apps/plugin-store : 2.2.0
- tauri-plugin-upload 🦀: 2.2.1
- @tauri-apps/plugin-upload : 2.2.1
- tauri-plugin-dialog 🦀: 2.2.2
- @tauri-apps/plugin-dialog : 2.2.2
- tauri-plugin-notification 🦀: 2.2.2
- @tauri-apps/plugin-notification : 2.2.2
- tauri-plugin-os 🦀: 2.2.1
- @tauri-apps/plugin-os : 2.2.1
- tauri-plugin-http 🦀: 2.4.4
- @tauri-apps/plugin-http : 2.4.4
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:3000/
- framework: Vue.js (Nuxt)
- bundler: Webpack
```
### Stack trace
```text
```
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.