Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photo Drag & Drop causes photo to be uploaded 3 times #2784

Open
teolemon opened this issue Dec 15, 2019 · 11 comments
Open

Photo Drag & Drop causes photo to be uploaded 3 times #2784

teolemon opened this issue Dec 15, 2019 · 11 comments

Comments

@teolemon
Copy link
Member

teolemon commented Dec 15, 2019

What

  1. Drag and drop a photo once.
  2. Get 3 multiple uploads of the same photo.

Part of

Screenshot

image

@teolemon teolemon added the 🐛 bug This is a bug, not a feature request. label Dec 15, 2019
@sashabrava
Copy link

sashabrava commented Dec 24, 2019

@teolemon, I've noticed the same thing on couple of my products, but the reason is different. Here's an example
https://world.openfoodfacts.org/cgi/product.pl?type=edit&code=5900783003968

The issue happened after I opened "Edit a product" Activity on Android application and pushed on the product picture. Pushing opened a dialog for cropping image, and confirming the cropping (even if you don't change image borders) creates a new file, and that's how duplicated files start to appear.
Android version: 5.1.1
App version: 3.2.3

I can send a screenshot if needed.
Or forward the issue to https://github.com/openfoodfacts/openfoodfacts-androidapp cause duplicated image is invisible for Android app.

@stephanegigandet stephanegigandet changed the title Same photo uploaded 3 times Drag and drop cause photo to be uploaded 3 times Jan 10, 2020
@stephanegigandet
Copy link
Contributor

Confirmed @teolemon 's bug. It happens only with drag and drop, which also seems to cause other issues like selecting some of those images for the new_lc language...

10 janvier 2020 à 12:24:48 CET - stephane Images sélectionnées (Ajout : ingredients_new_lc) - new image ingredients_new_lc : 5.16 - voir
10 janvier 2020 à 12:24:48 CET - stephane Images sélectionnées (Ajout : nutrition_new_lc) - new image nutrition_new_lc : 3.15 - voir

Probably some weird javascript bug with drag and drop + the file upload library.

@stephanegigandet stephanegigandet changed the title Drag and drop cause photo to be uploaded 3 times Drag and drop causes photo to be uploaded 3 times Jan 10, 2020
@nazimboudeffa
Copy link
Member

nazimboudeffa commented Jan 19, 2020

Can someone explain where is the bug exactly please, because I don't know where to drop the image

Because as its been sometime I stopped to watch the repo because of some reasons that has nothing to do with it and I just follow the javascript channel on slack in case there is bug, this one for instance

So, I don't remember haveing to upload an image with drag and drop from that time and when I connect to the site it displays the same interface as a while before

firefox_ZMBDtiSg1K

@stephanegigandet
Copy link
Contributor

@nazimboudeffa the interface has not changed, but it is possible to drag and drop images on the upload image button. Some people use it even though it is not advertised.

@nazimboudeffa
Copy link
Member

nazimboudeffa commented Jan 21, 2020

@stephanegigandet I just have uploaded an image and it didn't hapened maybe it's not on this button ? When does it happen @teolemon ?

qnJHLERTZc

firefox_1bnUEemswP

@teolemon
Copy link
Member Author

In that case, that was a product without barcode

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2020

Stale issue message

@Telperion87
Copy link

In my case it is often way more than 3 times. For sure it happens by drag and dropping, but if I'm not wrong it also happened by trying with the button "add an image".

in this case it has been uploaded 7 times. The unconveniet thing is that when I try to delete some of them, it deletes more photos than selected, even all of them. And when it happens it's a problem because
it won't let you upload the exact same photo because it someway still sees it on the DB.

2021-01-30 18_52_23

@teolemon
Copy link
Member Author

August 25th 2021
Still here
image

@teolemon teolemon changed the title Drag and drop causes photo to be uploaded 3 times Photo Drag & Drop causes photo to be uploaded 3 times Aug 25, 2021
@joepie91
Copy link

joepie91 commented Nov 16, 2023

This just happened for me as well (but 7 times, in my case!), on https://world.openfoodfacts.org/product/8713305815805/tea-lemon-citrus-becky-s - Firefox 119.0 (64-bit) on NixOS 23.05.4853.d4b5a67bbe9e. I indeed dragged a photo from my photo viewer (Gwenview) onto the "Add a picture" button.

@alexgarel
Copy link
Member

I think this is a bug related to jqueryfileupload.

Relevant code is in html/js/product-multilingual.js ( $('#imgupload_' + id).fileupload({)

@teolemon teolemon removed the 🐛 bug This is a bug, not a feature request. label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To discuss and validate
Development

No branches or pull requests

7 participants