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

Update gridfs.ts #561

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

Conversation

theBGuy
Copy link

@theBGuy theBGuy commented Oct 7, 2023

PR Checklist

Verify that you did the following:

  • [ x ] Opened an issue to track and discuss the problem you are trying to solve. (Someone else has this opened already)
  • [ x ] Submitted the changes using a new branch in your fork of this repo.
  • [ x ] Added test for the changes and checked that code coverage didn't diminished if possible. (No test added but checked code coverage)
  • [ x ] Docs were updated using jsdoc style comments when necessary. (N/A)

Related issue

Issue: #560

Describe what you did

GridFSBucket doesn't pass the file into a callback anymore, instead it sets the value of gridFSFile when the finish event is triggered. I added a check so to see f was undefined (handles if someone is using old driver and f was passed though callback) if it was then get the file from writeStream.gridFSFile

Is this a breaking change?

No, fixes broken compatibility with current mongodb driver

  • Yes
  • [ x ] No

- GridFSBucket doesn't pass the file into a callback anymore, instead it sets the value of gridFSFile when the finish event is triggered.
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.

None yet

1 participant