Last day i was excited when reading about the GridFS feature of mongoDB.
GridFS is a specification for storing and retrieving files that exceed the BSON-document size limit of 16MB.
Instead of storing a file in a single document, GridFS divides a file into parts, or chunks, and stores each of those chunks as a separate document. By default GridFS limits chunk size to 255k. GridFS uses two collections to store files. One collection stores the file chunks, and the other stores file metadata.
What we want to achieve with this tutorial is the ability for our app to upload a file from a form and save it to a mongoDB – GridFS store and the retrive it with a GET call.