1.0.0 • Published 4 years ago

mongoose-blob-store v1.0.0

Weekly downloads
23
License
Apache-2.0
Repository
github
Last release
4 years ago

mongoose-blob-store

store blobs using mongoose gridfs

npm version Build Status

blob-store-compatible

compatible with the abstract-blob-store API and passes its test suite

eg. Usage

Please note that the configuration has a breaking change since v0.*

const store = require('mongoose-blob-store');
// connect mongoose to mongo db then use the connection
const mongooseConnection = require('mongoose').connection;
const blobStorage = store({
  mongooseConnection,
  collection: 'attachments',
  modelName: 'Attachment',
});

//write
blobStorage.createWriteStream(opts, cb);

//read
const stream = blobStorage.createReadStream(opts);

//remove
blobStorage.remove(opts, cb);

//check if file exists
blobStorage.exists(opts, cb);

pull requests are welcome

1.0.0

4 years ago

0.1.8

4 years ago

0.1.7

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago