Search code examples
node.jsmongodbloopbackjsloopback

Store PDF file in mongoDB using nodeJS loopback 2.5


I want the user to upload pdf then I can store it in mongoDB in binData formate. using Loopback as my database backend .

no need for gridfs as the file will always be small

any suggestions on how that can be done ???


Solution

  • It will be hard without gridfs. The easiest way is to use LoopBack Storage Component (http://loopback.io/doc/en/lb2/Storage-component.html). You can use Local File System.