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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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
回答2:
The maximum size of a document in MongoDB 1.8 and above is 16Mb.
Previously it was 4Mb. GridFS enables one to seamlessly spread a single file across many documents. If you inspect the actual documents in MongoDB you will notice many separate documents, but through GridFS they will seamlessly appear as a single file.
Does that answer the question?