DioxusLabs / DioxusLabs/dioxus

select file not work on android, the same code will work on windows

Open
#3,720 0 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**
my code for picking a file by using an input element of type file
`
div {
class : "excel_box",
div {
label {
style: "
display: inline-block;
padding: 10px 20px;
background-color: #f0f0f0;
border: 1px solid #ccc;
border-radius: 4px;
cursor: pointer;
",
r#for: "excel-upload",
if file_selected.read().is_empty() {
"no file"
} else {
"selected {file_selected}"
}
}
input {
style: "opacity: 0; width: 0; height: 0; position: absolute;",
id: "excel-upload",
r#type: "file",
accept: ".xls,.xlsx",
multiple: true,
name: "unload_excel_file",
directory: enable_directory_upload,
onchange: upload_files,
}
}
}
`
It will work on windows,but not work on android. Is there a need for additional operations for android?

**Steps To Reproduce**

Steps to reproduce the behavior:

-
-
-

**Expected behavior**
Click to open the file selection dialog box, and then select a file on android lick windows.

**Screenshots**
on windows
response after click
![Image](https://github.com/user-attachments/assets/8b936448-8171-4c6f-a0ba-c9558c5a2ce7)
on android
no response after clicking
![Image](https://github.com/user-attachments/assets/74ea87aa-48df-4107-b9d2-38d2abf58c4c)

**Environment:**

- Dioxus version: 0.6.1
- Rust version: 1.84.0
- OS info: window11 24H2 26120.3073
- App platform: android

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.