1. Gridfs IntroductionGridfs is a submodule of MONGO that uses GRIDFS to persist files based on MongoDB. and supports distributed applications (file distribution storage and reading). As a solution for storing binary data in MongoDB in a database,
In this chapter, we carry out the last article of the Advanced Tutorial, GRIDFS study. In this chapter, we will learn the following:Create a Gridfs object ("Grid::fsbucket")
Write Data stream Processing
Read Data stream
MongoDB Gridfs is a MongoDB file storage scheme that is primarily used to store and restore files that exceed 16M (Bson file limits), such as pictures, audio, etc., and have better performance for large files.To use Gridfs in C #, first install the
Gridfs is a file specification that stores large files in a MongoDB database. All officially supported drivers implement the GRIDFS specification.Gridfs is a built-in feature in MongoDB that can be used to store a large number of small files.Website
Gridfs is a specification for storing large files in MongoDB. All officially supported drivers have implemented the gridfs specification.
Basic Principles
The Database supports binary data storage in bson object format. However, in MongoDB, The
Because the company before the electronic business system image storage used is MongoDB, so yesterday after the discussion of the original Fastfds switch to MongoDB Gridfs.
MongoDB's fragmentation mechanism is also highly available and highly
statement: The article is mainly from the "MongoDB Combat" a book, the main want to learn from the book MongoDB Knowledge, deepen understanding, so write in their own blog, as a record, in the final chapter, There will be a Web application that sets
Directly paste the English text. Poor translation affects readers. The English text is as follows:
Gridfs example
This example shows how to useGridfsTo store large binaryobjects (e.g. Files) in MongoDB.
See also
The API docsGridfs.
See also
This
Some time ago read a coder write with Gridfs-stream to store files, feel good on their own with the Gridfs-stream module to write a file storage service, but found that the stored files are always deleted, I call the GFS's remove API, Delete the _id
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.