gpfup-require-camera.js
: Fixed issue with some Android Phones.
#885
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
⛑️ Ticket(s): https://secure.helpscout.net/conversation/2700871854/71092
Summary
When using the Require Camera for Uploads snippet and a restriction is set on a field (ex: jpg, png, pdf), Android phones will allow the user to select images from the camera roll, even though they shouldn't be allowed to. This is not the case with iPhones.
This seems more of like something because of a recent update for Chrome Android: https://stackoverflow.com/questions/77876374/html-input-type-file-not-working-to-pull-up-camera-for-pixel-android-14-comb
As a fix, we are adding the
accept
attribute can help restrict it to images from the camera.Loom walkthrough with demo of the fix (tested on a Pixel7 via browserstack):
https://www.loom.com/share/9fdffe90df88495888b5b3e7c38edac6