openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - πŸͺπŸ¦‹ Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
660 stars 389 forks source link

Image upload on mobile website doesn't allow to take a photo on Android 14 devices #9826

Open EmilJunker opened 9 months ago

EmilJunker commented 9 months ago

What

I am having an issue with the OpenFoodFacts website on my Samsung A53 phone running Android 14.

When I'm on the product edit page and I press the button to upload a photo, it doesn't give me the option to take a photo with the camera. It only lets me upload existing photos from the gallery. According to this Stackoverflow post, it appears to be a general problem that affects Android 14 devices:

https://stackoverflow.com/a/77946179

There is also this Google forum post about the same issue:

https://support.google.com/chrome/a/thread/230565753/android-version-116-doesn-t-allow-to-take-a-picture-with-camera-on-file-upload?hl=en

As a possible workaround, you could just remove the "accepts" attribute from the HTML files input element if you detect that the user is on Android 14. This would make it possible again to take a photo and upload it directly from the browser.

Steps to reproduce the behavior

  1. On Android 14 phone, open a web browser and go to openfoodfacts.org
  2. Click on any product and then go to the product edit page
  3. Sign in to account if needed
  4. Scroll down to product image section and tap on "Add a picture" button
  5. Observe that it doesn't give you the option to take a photo. It only lets you upload existing photos from the gallery.

Expected behavior

Type of device

Number of products impacted

Time per product

kemsguy7 commented 8 months ago

@stephanegigandet , please assign this to me

stephanegigandet commented 8 months ago

@kemsguy7 : we usually don't assign issues, you can just say that you are working on it. This is because in the past a lot of issues that were assigned where in fact not worked on