Skip to content

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

Merged
merged 3 commits into from
Jan 8, 2025
Merged

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented Jan 6, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-45191

Staging Links

  • 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

    netlify bot commented Jan 6, 2025

    Deploy Preview for docs-ruby ready!

    Name Link
    🔨 Latest commit a5ebba3
    🔍 Latest deploy log https://app.netlify.com/sites/docs-ruby/deploys/677d804c243a0c00087caf1e
    😎 Deploy Preview https://deploy-preview-118--docs-ruby.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Collaborator

    @mongoKart mongoKart left a 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

    @mcmorisi mcmorisi requested a review from mongoKart January 7, 2025 19:28
    Copy link
    Collaborator

    @mongoKart mongoKart left a comment

    Choose a reason for hiding this comment

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

    LGTM!

    @mcmorisi mcmorisi merged commit 2f3d2cb into mongodb:standardization Jan 8, 2025
    5 checks passed
    @mcmorisi mcmorisi deleted the DOCSP-45191-gridfs branch January 8, 2025 13:42
    Copy link
    Contributor

    @jamis jamis left a 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)
    Copy link
    Contributor

    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.

    Copy link
    Collaborator Author

    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|
    Copy link
    Contributor

    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|

    @mcmorisi mcmorisi mentioned this pull request Jan 10, 2025
    5 tasks
    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.

    4 participants