Monday, 3 April 2017

Using mongoose-file plugin to write a mongoose model

I am new to using mongoDB. I am writing a node.js server application with mongoDb and express. I have a model that will be storing image files. Since the maximum size of a mongo object is 16MB, I did some research and decided to use the mongoose-file plugin (since I am using mongoose to write my models) to be able to achieve storing files over 16MB. My problem is in understanding the javascript mongoose file sample. Say for example I have a model called User and a user could have many photos, how should this be done using mongoose and mongoose-file plugin?



via cdaiga

No comments:

Post a Comment