-
Notifications
You must be signed in to change notification settings - Fork 29
DOCSP-45191: GridFS #118
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-45191: GridFS #118
Conversation
✅ Deploy Preview for docs-ruby ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
just a few small changes. nice job
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!
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.
I know this has already been merged, but I wanted to point out a couple of things. Sorry I didn't get to this yesterday.
collection = database[:restaurants] | ||
|
||
# start-create-bucket | ||
bucket = Mongo::Grid::FSBucket.new(database) |
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.
The recommended API for creating a bucket is actually via the #fs
method on the database, e.g.:
bucket = database.fs
# or, with options
bucket = database.fs(bucket_name: 'files')
Using the `Mongo::Grid::FSBucket`` API directly works, too, but is more verbose and less friendly.
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.
I can create a follow-up PR to address these comments. Thanks for the eyes!
# end-upload-files | ||
|
||
# start-retrieve-file-info | ||
bucket.find().each do |file| |
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.
Empty parentheses are almost always omitted, by convention, e.g.
bucket.find.each do |file|
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-45191
Staging Links
Self-Review Checklist