Skip to content

docs: add documentation for upload_image() method#458

Closed
nithinskumar866 wants to merge 1 commit intoopenfoodfacts:developfrom
nithinskumar866:img-upload-doc
Closed

docs: add documentation for upload_image() method#458
nithinskumar866 wants to merge 1 commit intoopenfoodfacts:developfrom
nithinskumar866:img-upload-doc

Conversation

@nithinskumar866
Copy link
Copy Markdown

Description

Developers can already upload product images to Open Food Facts using the upload_image() method in ProductResource provided by the Python SDK.

But , developers(even i faced this issue) find it challenging to find and utilize this functionality because it is currently not documented in the README or usage examples.

The documentation for the upload_image() method is added in this PR.

Solution

This modification adds a new section explaining how to upload product images using the SDK under the Examples section of the README.

Among the documents are:

A working code example demonstrating how to upload an image,

  • Describes necessary parameters like code, image_path, image_data_base64, and selected.Making it clear that write operations require authentication

By making the image upload feature simpler to find and utilize, this enhances the developer experience.

Related issue(s)

Fixes #55

@sonarqubecloud
Copy link
Copy Markdown

@nithinskumar866 nithinskumar866 changed the title Added documentation for image upload with upload_image() method docs: add documentation for upload_image() method Mar 16, 2026
@nithinskumar866
Copy link
Copy Markdown
Author

Hi maintainers ,

Just a gentle follow-up on this PR.

This change adds documentation for the upload_image() method, including usage examples and explanation of parameters to improve discoverability for developers.

I’d really appreciate any feedback or suggestions for improvement whenever you have time. Happy to make updates as needed.

Thanks for your time and for maintaining the project!

Comment thread README.md

Authentication is required to perform write operations. You must provide a valid `username` and `password` when initializing the API object.

Example:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i’m closing this pr for now. please discuss it in the appropriate slack channel (#api or #contributors) to see if it’s needed, and then you can raise a new pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Document image addition

2 participants