Usage of this module
var lib = require('node-gridfs-helper');
var express = require('express'); var app = express(); var server = app.listen(4000);
lib.config('sampleDb','127.0.0.1','27017');
app.post('/file',lib.uploadImage);
app.get('/file/:id',lib.viewImage);
app.get('/', function(req, res) {
// show a file upload form
res.writeHead(200, {'content-type': 'text/html'});
res.end(
''+
'
'+
''+
''
);
});
Browser Type in Url /* http://localhost:4000 http://localhost:4000/file/ eg:56475645645645646 */