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

Fix s3 put_object example #3177

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tim-finnigan
Copy link
Contributor

@tim-finnigan tim-finnigan commented May 14, 2024

Fixes boto/boto3#4126

The example is on this page: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/put_object.html

This PR fixes the example and makes it consistent with other examples here and here.


Although this fixes an inconsistency, the examples are still misleading as mentioned in boto/boto3#4126 (comment).

Do we want to update each of them to be like this?

with open('HappyFace.jpg', 'rb') as file:
    response = client.put_object(
        Body=file.read(),
        Bucket='examplebucket',
        Key='HappyFace.jpg',
    )

@codecov-commenter
Copy link

codecov-commenter commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.14%. Comparing base (8fd0160) to head (f470ce5).
Report is 280 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3177   +/-   ##
========================================
  Coverage    93.14%   93.14%           
========================================
  Files           66       66           
  Lines        14237    14248   +11     
========================================
+ Hits         13261    13272   +11     
  Misses         976      976           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. s3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation of put_object is confusing
2 participants