Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: handle buffers stored in MongoDB as EJSON representation with { $binary } #14932

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #14911

Summary

#14911 is caused by some edge case that caused buffers to be saved in MongoDB as { $binary: 'base64str' } EJSON representation. In older versions of Mongoose, Mongoose buffers correctly handled that format, so I'm adding explicit support for that format with tests for compatibility.

Examples

@vkarpov15 vkarpov15 added this to the 8.6.5 milestone Oct 2, 2024
@vkarpov15 vkarpov15 merged commit 048eebc into master Oct 7, 2024
46 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-14911 branch October 9, 2024 09:30
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cast to Buffer failed after updating from version 8.5.2 to 8.6.3
1 participant