我使用船长gridfs在我的风帆应用中上传图片,这是我的功能:
upload: (req, res) => {
req.file('avatar')
.upload({
adapter: require('skipper-gridfs'),
uri: 'mongodb://127.0.0.1/27017/linucLab',
maxBytes: 1000000
}, function whenDone(err, uploadedFiles) {
if (err) return res.serverError(err);
else return res.json({
files: uploadedFiles,
textParams: req.allParams()
});
});
}
我收到此错误
MongoError: Can't get executor for query { files_id: ObjectId('591b702ad01d3aa826d545ba'), n: { $gte: 0 } }