gridfs-stream
makes that pretty easy:
// `gfs` is a gridfs-stream instance
app.post('/picture', function(req, res) {
req.pipe(gfs.createWriteStream({
filename: 'test'
}));
res.send("Success!");
});
More Related Contents:
- access MONGODB on remote server [closed]
- Updating a Nested Array with MongoDB
- How to properly reuse connection to Mongodb across NodeJs application and modules
- Issue in returning data retrieved from DB queries called in the loop
- How do I update/upsert a document in Mongoose?
- Render basic HTML view?
- How do I remove documents using Node.js Mongoose?
- Mongoose difference between .save() and using update()
- UnhandledPromiseRejectionWarning: MongooseServerSelectionError
- MongoDB select where in array of _id?
- Inserting and Querying Date with MongoDB and Nodejs
- What is the right way to make a synchronous MongoDB query in Node.js?
- Mongoose subdocuments vs nested schema
- Formatting ISODate from Mongodb
- How to get updated document back from the findOneAndUpdate method?
- Can I determine if a string is a MongoDB ObjectID?
- How to change all the array elements in a mongodb document to a certain value? [duplicate]
- Cannot find module ‘../build/Release/bson’] code: ‘MODULE_NOT_FOUND’ } js-bson: Failed to load c++ bson extension, using pure JS version
- Server Discovery And Monitoring engine is deprecated
- How to use MongoDB with promises in Node.js?
- Create an ISO date object in javascript
- MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
- Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent
- Node.js – wait for multiple async calls
- Find after populate mongoose
- What is the difference between id and _id in mongoose?
- How to convert a string to ObjectId in nodejs mongodb native driver?
- JavaScript NoSQL Injection prevention in MongoDB
- Cannot connect to MongoDB because of wrong URI
- MongooseError: Model.findOne() no longer accepts a callback at Function