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

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

问题描述

我想将100MB到1GB的大文件存储在MongoDB中,就像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天全站免登陆