Skip to content

Conversation

norareidy
Copy link
Collaborator

@norareidy norareidy commented Aug 7, 2024

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-42254
Staging - https://preview-mongodbnorareidy.gatsbyjs.io/pymongo/DOCSP-42254-fix-gridfs-code/write/gridfs/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link
Contributor

@rustagir rustagir left a comment

Choose a reason for hiding this comment

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

looks good, left some comments/questions

Comment on lines 1 to 5
# start create bucket
client = MongoClient("<connection string>")
db = client["db"]
bucket = gridfs.GridFSBucket(db)
# end create bucket
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: why is the code in this file indented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

Comment on lines 12 to 15
with bucket.open_upload_stream(
"my_file", chunk_size_bytes=1048576,
metadata={"contentType": "text/plain"}) as grid_in:
grid_in.write("data to store")
Copy link
Contributor

Choose a reason for hiding this comment

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

S: i think the line formatting needs to be corrected here

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM!

@norareidy norareidy merged commit 7e64c10 into mongodb:master Aug 8, 2024
1 of 2 checks passed
@norareidy norareidy deleted the DOCSP-42254-fix-gridfs-code branch August 8, 2024 14:45
norareidy added a commit that referenced this pull request Aug 8, 2024
* DOCSP-42254: Fix GridFS code

* edit wording

* fixes

* reword

* dedent

* RR feedback

(cherry picked from commit 7e64c10)
norareidy added a commit that referenced this pull request Aug 8, 2024
* DOCSP-42254: Fix GridFS code

* edit wording

* fixes

* reword

* dedent

* RR feedback

(cherry picked from commit 7e64c10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants