wry icon indicating copy to clipboard operation
wry copied to clipboard

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

Open aiueo13 opened this issue 6 months ago • 0 comments

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 avatar Aug 22 '24 12:08 aiueo13