This Packge is currently broken due to some issues releated to owner's code, and mainly due to bugs related to external packages:
Do not use this package!!!
This package is writen to buypass buffering of the images in memory or on disk in the roadmap - client->sharp->gridfs.
To initialize a storage, the only required argument is GridFsBucket instance in constructor options:
const { MulterSharpGridFS } = require('multer-sharp-gridfs-storage')
const storage = new MulterSharpGridFS({
gridFSBucket
})When useing this storage, every uploaded image will be passed through sharp() instance and from there to GridFs with a single stream of data, without buffering or storing in the middle.
For options details see TSDocs.