fix: GridFS file storage doesn't work with certain enableSchemaHooks settings (#8467)
This commit is contained in:
@@ -34,7 +34,11 @@ export class GridFSBucketAdapter extends FilesAdapter {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
};
|
||||
this._mongoOptions = Object.assign(defaultMongoOptions, mongoOptions);
|
||||
const _mongoOptions = Object.assign(defaultMongoOptions, mongoOptions);
|
||||
for (const key of ['enableSchemaHooks', 'schemaCacheTtl', 'maxTimeMS']) {
|
||||
delete _mongoOptions[key];
|
||||
}
|
||||
this._mongoOptions = _mongoOptions;
|
||||
}
|
||||
|
||||
_connect() {
|
||||
|
||||
Reference in New Issue
Block a user