Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android error when select one image not multiple by <input type="file" accept="image/*" multiple> . #1349

Open
aiueo13 opened this issue Aug 22, 2024 · 0 comments

Comments

@aiueo13
Copy link

aiueo13 commented Aug 22, 2024

Describe the bug
In android, when <input type="file" multiple accept="image/*" /> selects only one image, it is not reflected. In other words, if we select only one image with the multiple selection option from the gallery instead of the file picker, will not reflect this. (if selected multiple images, it will reflect.)

<input type="file" multiple/>, <input type="file" />, <input type="file" accept="image/*" /> will be correctly reflected for single or multiple images.

Additional context
I found an article mentioning the similar issue.
https://stackoverflow.com/questions/40472983/android-error-when-select-one-image-not-multiple?rq=3

(I am a newbie to android so what I am about to say could be wrong.)
In fact, when I looked at the method of showFilePicker in wry/src/android/kotlin/RustWebChromeClient.kt, it called clipData but not getData(), as the article above says.
(The showFilePicker is called from the onShowFileChooser in the same file, which is called when <input type="file"> is pressed.)

@aiueo13 aiueo13 changed the title Android error when select one image not multiple by <input type="file"> . Android error when select one image not multiple by <input type="file" accept="image/*" mul> . Aug 22, 2024
@aiueo13 aiueo13 changed the title Android error when select one image not multiple by <input type="file" accept="image/*" mul> . Android error when select one image not multiple by <input type="file" accept="image/*" multiple> . Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant