Fix base64 upload issues, bring in patched gridfs-stream
This commit is contained in:
@@ -6,8 +6,6 @@ import autobind from "autobind-decorator"
|
||||
import * as Schemas from "./schemas"
|
||||
import util from "util"
|
||||
|
||||
Grid.mongo = mongoose.mongo
|
||||
|
||||
@autobind
|
||||
export class DB {
|
||||
constructor() {
|
||||
@@ -20,7 +18,7 @@ export class DB {
|
||||
autoIndex: !isProduction,
|
||||
})
|
||||
|
||||
this.gridfs = Grid(connection.db)
|
||||
this.gridfs = Grid(connection.db, mongoose.mongo)
|
||||
this.gridfs.findOneAsync = util.promisify(this.gridfs.findOne)
|
||||
this.gridfs.removeAsync = util.promisify(this.gridfs.remove)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user