-
Notifications
You must be signed in to change notification settings - Fork 20
DOCSP-42254: Fix GridFS code #99
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
DOCSP-42254: Fix GridFS code #99
Conversation
There was a problem hiding this 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
source/includes/gridfs/gridfs.py
Outdated
# start create bucket | ||
client = MongoClient("<connection string>") | ||
db = client["db"] | ||
bucket = gridfs.GridFSBucket(db) | ||
# end create bucket |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
source/includes/gridfs/gridfs.py
Outdated
with bucket.open_upload_stream( | ||
"my_file", chunk_size_bytes=1048576, | ||
metadata={"contentType": "text/plain"}) as grid_in: | ||
grid_in.write("data to store") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* DOCSP-42254: Fix GridFS code * edit wording * fixes * reword * dedent * RR feedback (cherry picked from commit 7e64c10)
* DOCSP-42254: Fix GridFS code * edit wording * fixes * reword * dedent * RR feedback (cherry picked from commit 7e64c10)
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