ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.24k stars 955 forks source link

[Bug]: Camera's pickImages only allows one photo to be picked. #7393

Closed kobe-ra closed 1 month ago

kobe-ra commented 1 month ago

Capacitor Version

Capacitor Doctor

Latest Dependencies:

@capacitor/cli: 5.7.4 @capacitor/core: 5.7.4 @capacitor/android: 5.7.4 @capacitor/ios: 5.7.4

Installed Dependencies:

@capacitor/cli: 5.6.0 @capacitor/android: 5.6.0 @capacitor/ios: 5.6.0 @capacitor/core: 5.6.0

[success] Android looking great! 👌 [error] Xcode is not installed

Other API Details

npm --version
10.5.2

node --version
v20.9.0

Platforms Affected

Current Behavior

User clicks button that calls Camera.pickImages() without any settings. It opens their filesystem, allowing them to pick one single file. On tapping second file, the first gets unselected (radio button behavior) WhatsApp Image 2024-04-12 at 11 25 13 WhatsApp Image 2024-04-12 at 11 26 06

When implemented with <input type="file"> their phone correctly opens gallery and allows multiple files input.

Expected Behavior

Allowing user to pick multiple files.

Project Reproduction

unnecessary without MIUI 14

Additional Information

Can this be solved on capacitor's side or is is OS problem? OS itself allows multi file selection since it works with element, so it should be possible for pickImages() too.

jcesarmobile commented 1 month ago

This is a limitation on some devices where their gallery app don't understand the attributes to select multiple pictures.

Hopefully the new picker used in Capacitor Camera plugin 6.x that will be released soon fixes this issues, if you say input file works, the new picker will probably work too.

ionitron-bot[bot] commented 6 days ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.