Gridfs and mongoose file upload
问题 I have ran into a problem with gridfs file upload. Basically I get this bizzare error and I have yet not found solution for solving this problem. Here is my code that should deal with file upload: var path = require('path'); var router = require('express').Router(); var mongoose = require('mongoose'); var serverConfig = require('../config.js'); var multiparty = require('connect-multiparty')(); var fs = require('fs'); var GridFs = require('gridfs-stream'); var db = mongoose.connection.db; var