1.0.0 • Published 2 years ago

gridfs-pipe v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

gridfs-pipe

a tool for upload download mongodb gridfs.

Installation

$ npm install gridfs-pipe

Usage

const gridfsPipe = require('gridfs-pipe');
gridfsPipe.connect({
  DB_URL: ''
}).then(() => {
  /*
  const testFile = path.resolve(__dirname, './test.png');
  gridfsPipe.upload({
    file: fs.createReadStream(testFile),
    filename: 'test.png',
    id: 'test.png'
  })
   */
  
  /*
  gridfsPipe.download({
    id: _id
  })
  */
})