Capacitor input file not working on Android

Hello everybody!

I’m trying to add an input file to my application, in the web version it does work correctly, while in the android application version it does not.

This is the input

<input type="file" accept=".png, .jpg, .jpeg" name="profilePhoto">

And the capacitor version

    "@capacitor/android": "^2.2.0",
    "@capacitor/core": "2.2.0",
    "@capacitor/ios": "^2.2.0",

I’ve seen this GitHub issue, but I’m not sure how to approach the suggested workaround.

I’ve also seen this stackoverflow question, but it has not helped me.

It is kind of a basic operation to do, so I’m sure I’m doing something wrong here.

Anyone can help me out? Thanks!

Edit: Tested also on iOs simulator and it works just fine

https://caniuse.com/#feat=input-file-accept

Basically is better to not use accept=".png, .jpg, .jpeg" and to stick with accept="image/*"

Solved