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

Image upload API: return the imgid when a picture is already uploaded #778

Closed
Tracked by #5523
stephanegigandet opened this issue Mar 15, 2017 · 2 comments
Closed
Tracked by #5523
Labels
API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) ⏲️ 5 minute fix

Comments

@stephanegigandet
Copy link
Contributor

francois: do you think it could be possible to send the imgid of the picture when we upload a photo that is already imported ?
right now, we have {"status":"status not ok","error":"This picture has already been sent.","imgid":"-3"}

@stephanegigandet stephanegigandet added ⏲️ 5 minute fix API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) labels Mar 15, 2017
@Fienne
Copy link

Fienne commented Mar 29, 2022

@stephanegigandet can I work on this?

@stephanegigandet
Copy link
Contributor Author

@Fienne I think that one has been fixed already in fact.

Current results of the API if we send a picture that has already been sent:

{
    "imgid": 1,
    "imagefield": "front_en",
    "error": "This picture has already been sent.",
    "status": "status not ok",
    "files": [
        {
            "url": "/product/4251105501381/smacktastic-flavor-powder-peanut-chocolate-chips",
            "name": "Smacktastic Flavor Powder Peanut Chocolate Chips",
            "filename": "",
            "thumbnailUrl": "/images/products/425/110/550/1381/1.100.jpg",
            "code": "4251105501381"
        }
    ],
    "code": "4251105501381",
    "debug": "product_id: 4251105501381 - user_id:  - imagefield: front_en - size of image file received: 159563 - saved jpg: 161011 - we already have an image with this file size: 159563 - imgid: 1"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) ⏲️ 5 minute fix
Projects
Development

No branches or pull requests

2 participants