LoopBack storage mongo component provides Node.js and REST APIs to manage binary contents using Mongodb gridfs

Installation

Install the storage component as usual for a Node package:

npm install --save loopback-component-storage-mongo

Using it

Edit you datasources.json and add the following part

" gridfs " : { " name " : " gridfs " , " connector " : " loopback-component-storage-mongo " , " host " : " localhost " , " port " : 27017 , " database " : " test " }

And the you can use it as a datasource of your model.

API