capacitor use input type file to select between Camera and file browser

Viewed 595

I’m trying to have the same behavior as in Google Chrome on Mobile,

When I have an input type=“file”, it opens a selector to choose between Camera and file Browser

I tried the following :

<input type="file" accept="image/*;capture=camera" /> and <input type="file" accept="image/*" />, they both gives the ability to choose on Chrome mobile but directly open the file browser on capacitor

<input type="file" accept="image/*" capture="environment"/> opens directly the camera without the option to choose.

Anyway i can get the same behavior of Chrome on mobile ? I tried to check the standards but apparently accept=“image/*” should be enough

Thanks,

0 Answers
Related