Socket
Socket
Sign inDemoInstall

mongoose-gridfs

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-gridfs - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

11

lib/storage.js

@@ -27,7 +27,10 @@ 'use strict';

//initialize grid fs database
var db = this.options.mongooseConnection || mongoose.connection.db;
//get either option connection or mongoose connection
var conn = this.options.mongooseConnection || mongoose.connection;
//TODO ensure mongoose connection
this.storage = new Grid(db);
//Check if mongoose is connected.
if(conn.readyState !== 1) {
throw new Error('Mongoose is not connected');
}
this.storage = new Grid(conn.db);
}

@@ -34,0 +37,0 @@

{
"name": "mongoose-gridfs",
"version": "0.2.0",
"version": "0.3.0",
"description": "mongoose gridfs on top of gridfs-stream",

@@ -33,15 +33,15 @@ "main": "index.js",

"devDependencies": {
"async": "^2.3.0",
"chai": "^3.5.0",
"async": "^2.5.0",
"chai": "^4.1.2",
"grunt": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-mocha-test": "^0.13.2",
"grunt-mocha-test": "^0.13.3",
"is-stream": "^1.1.0",
"jshint-stylish": "^2.2.1",
"load-grunt-tasks": "^3.5.2",
"mime": "^1.3.4",
"mocha": "^3.2.0",
"mongoose": "^4.9.3"
"mime": "^2.0.3",
"mocha": "^4.0.1",
"mongoose": "^4.12.4"
}
}

@@ -21,3 +21,3 @@ mongoose-gridfs

//mongoose connect
var connection = mongoose.connect('mongodb://localhost/test');
mongoose.connect('mongodb://localhost/test');

@@ -28,3 +28,3 @@ //instantiate mongoose-gridfs

model:'Attachment',
mongooseConnection: connection
mongooseConnection: mongoose.connection
});

@@ -31,0 +31,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc