1.0.0 • Published 3 years ago
gridfs-pipe v1.0.0
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
})
*/
})
1.0.0
3 years ago