DioxusLabs / DioxusLabs/dioxus
Cross Platform File Selection API
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Feature Request
Dioxus should have a cross platform api for programmatic file selection/saving.
Currently, we can use
```rust
rsx! {
input { r#type: "file" }
}
```
for file selection on web and desktop, and once https://github.com/DioxusLabs/dioxus/issues/3849 is resolved, mobile as well. Thus giving us a cross platform file selection element.
But there is no direct file selection api that can be invoked programmatically. On desktop we can use rfd directly with e.g. `rfd::FileDialog::new().set_directory(&path).pick_file();`, but this does not work for web or mobile. Thus there should be an api that can be used directly that covers web, desktop, and eventually mobile.
On web, the `set_directory` option should be ignored, since browsers are sandboxed so it will not have an effect.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.