在 Mongodb 中存储 100 MB 的大文件 [英] Storing large file of 100 MB in Mongodb

查看:28
本文介绍了在 Mongodb 中存储 100 MB 的大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 MongoDB 中存储 100MB 到 1GB 的大文件,就像 BLOB 对象一样,以后可以更容易地检索它.我使用的编程语言是 PHP请在这个意义上指导我.

I want to store Large file of 100MB to 1GB in MongoDB just like BLOB object and later on can easier retrieve it. The programming language that i am using is PHP Please guide me in this sense.

推荐答案

您需要为此使用 GridFS,因为通常 MongoDB 文档限制为 16MB.请参阅 http://www.php.net 的 PHP 文档中的概述和示例/manual/en/class.mongogridfs.php

You need to use GridFS for this as normally MongoDB documents are limited to 16MB. See the overview and examples in the PHP documentation at http://www.php.net/manual/en/class.mongogridfs.php

这篇关于在 Mongodb 中存储 100 MB 的大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆