javascript - 如何增加mongodb的文档大小(超过16MB)?我

标签 javascript mongodb

我无法将文件大小增加超过 16 MB。我没有创建多个文档的选项。我阅读了很多关于相同内容的博客,但是我没有找到任何特定的解决方案。我想调整大小为 30 MB 的单个文件中的数据

最佳答案

来自文档(https://docs.mongodb.com/manual/reference/limits/#bson-documents):

BSON Document Size The maximum BSON document size is 16 megabytes.

The maximum document size helps ensure that a single document cannot use excessive amount of RAM or, during transmission, excessive amount of bandwidth. To store documents larger than the maximum size, MongoDB provides the GridFS API. See mongofiles and the documentation for your driver for more information about GridFS.

唯一的问题是:您确定需要这么大的单个文档吗?

关于javascript - 如何增加mongodb的文档大小(超过16MB)?我,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42272950/

相关文章:

php - 如何使用 mongodb 和 php 正确处理分页查询?

node.js - Mongodb如何在Find Promise中插入?

javascript - 传递嵌套文档查询字段

ruby-on-rails - 数据库之间的 Rake 任务复制

javascript - 使用 webpack 将第三方脚本导入 React/Redux 应用程序

javascript - flask render_template 不适用于 AJAX 帖子

javascript - 使用快速应用程序生成器时无法在 aws cloud9 中预览应用程序

java - 从 LinkedHashMap 转换为 Json 字符串

javascript - 在 React/Redux 中插入对象时如何避免 'two children with the same key' 警告

javascript - Angular 2 : call component method from javascript function