lib/gfsupload.js
function GFSupload(mongoinst, prefix) {
  this.mongo = mongoinst;
  this.db = this.mongo.db;
  this.Grid = this.mongo.Grid;
  this.GridStore = this.mongo.GridStore;
  this.ObjectID = this.mongo.ObjectID;
  this.prefix = prefix || this.GridStore.DEFAULT_ROOT_COLLECTION;
  return this;
}
function GFSupload(mongoinst, prefix) {
  this.mongo = mongoinst;
  this.db = this.mongo.db;
  this.Grid = this.mongo.Grid;
  this.GridStore = this.mongo.GridStore;
  this.ObjectID = this.mongo.ObjectID;
  this.prefix = prefix || this.GridStore.DEFAULT_ROOT_COLLECTION;
  return this;
}
function GFSupload ( mongoinst , prefix ) { this . mongo = mongoinst ; this . db = this . mongo . db ; this . Grid = this . mongo . Grid ; this . GridStore = this . mongo . GridStore ; this . ObjectID = this . mongo . ObjectID ; this . prefix = prefix || this . GridStore . DEFAULT_ROOT_COLLECTION ; return this ; }
This class enables gridfs uploads for all the mongoose users

@constructor
@param {Object} mongoose Mongoose Object from you application
@param {String} prefix Prefix for the database like "imports"
@author "Dominic Böttger" <Dominic.Boettger@inspirationlabs.com>

@return {Object}
This class enables gridfs uploads for all the mongoose users