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

Improve the image POST API #722

Open
Tracked by #5523
aleene opened this issue Feb 9, 2017 · 3 comments
Open
Tracked by #5523

Improve the image POST API #722

aleene opened this issue Feb 9, 2017 · 3 comments
Labels
API Refactor API WRITE WRITE API to allow sending product info and image API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🖼️ Image upload

Comments

@aleene
Copy link
Contributor

aleene commented Feb 9, 2017

What

  • I have been experimenting with the current image write api. Several remarks:
    • add username/password as parameters;
    • image load does not replace current image, then front etc has no meaning;
    • allow to upload images in general, not related to front/ingredients/nutrition;

Part of

@hangy hangy added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🖼️ Image upload labels Feb 12, 2017
@stephanegigandet
Copy link
Contributor

Regarding the 2nd point, the current intended behavior of product_image_upload.pl is to select the image for front / ingredient / nutrition only if there isn't an existing image selected. It is kind of a default image, it is expected that it will then be cropped by the user using product_image_crop.pl

For the 3rd point, I haven't tried it, but just putting "other" for the imagefield probably works. (or any other name for that matter, but maybe we can standardize on other)

@stephanegigandet
Copy link
Contributor

Regarding the password, you can pass user_id and password in the post parameters.

@aleene
Copy link
Contributor Author

aleene commented Feb 14, 2017

So I delete the image first, and then upload/select the image.
I intend to implement a native crop solution.

@teolemon teolemon added ✨ Feature Features or enhancements to Open Food Facts server and removed ✨ Feature Features or enhancements to Open Food Facts server labels May 3, 2017
@teolemon teolemon changed the title Improve image post api Improve the image POST API Oct 12, 2022
@teolemon teolemon added the API WRITE WRITE API to allow sending product info and image label Oct 12, 2022
@teolemon teolemon added API Refactor and removed ✨ Feature Features or enhancements to Open Food Facts server labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Refactor API WRITE WRITE API to allow sending product info and image API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🖼️ Image upload
Projects
Status: To discuss and validate
Development

No branches or pull requests

4 participants