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

Allow for a photo comment to be passed with image upload API requests #6534

Open
teolemon opened this issue Mar 31, 2022 · 7 comments
Open
Labels
API WRITE WRITE API to allow sending product info and image good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. Hacktoberfest 🖼️ Image upload 👮 Moderation ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.

Comments

@teolemon
Copy link
Member

teolemon commented Mar 31, 2022

What

  • Allow for a photo comment to be passed with image upload API requests

Why

  • We can't moderate anonymous image uploads from Smoothie and other apps

Example

https://world.openfoodfacts.org/product/8006786051900/gel-hydroalcoolique-primagel
image

Code pointers

The corresponding code in cgi/product_image_upload.pl and Images.pm (process_image_upload() function)

Part of

@teolemon teolemon added 🖼️ Image upload API WRITE WRITE API to allow sending product info and image moderation labels Mar 31, 2022
@alexgarel alexgarel added the good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. label Apr 1, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2022

This issue is stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Jul 1, 2022
@stephanegigandet
Copy link
Contributor

The corresponding code in cgi/product_image_upload.pl and Images.pm (process_image_upload() function)

@teolemon teolemon added the ✨ Feature Features or enhancements to Open Food Facts server label Apr 1, 2024
@deveshidwivedi
Copy link
Contributor

Hi @stephanegigandet! As a part of this do we need a new subroutine that takes the comment as an input from user?

@stephanegigandet
Copy link
Contributor

Hi @stephanegigandet! As a part of this do we need a new subroutine that takes the comment as an input from user?

Hi @deveshidwivedi , this issue is for API request, to have a comment supplied by the app (not the user). So there is no need to add an input from user, we just need to change the backend to record the comment supplied through the API.

@teolemon teolemon removed the osd'22 label Apr 19, 2024
@deveshidwivedi
Copy link
Contributor

Hi @stephanegigandet! Is this the correct way to proceed?

@stephanegigandet
Copy link
Contributor

Hi @deveshidwivedi it's a good start, you need to call request_param("comment") to get the value passed to the API. Also we may want to keep "Image upload" as the comment, and then add the comment passed to the app to it. e.g. "Image upload - some extra comment from the app / the user"

@deveshidwivedi
Copy link
Contributor

Thank you! @stephanegigandet I get it now

@teolemon teolemon removed the ✨ Feature Features or enhancements to Open Food Facts server label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API WRITE WRITE API to allow sending product info and image good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. Hacktoberfest 🖼️ Image upload 👮 Moderation ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.
Projects
Status: To discuss and validate
Status: Backlog
Development

Successfully merging a pull request may close this issue.

4 participants