Profile Picture

This commit is contained in:
SowinskiBraeden committed 2020-11-30 10:25:40 -08:00
1 parent 867770e14e
commit 43f662982e
365 files changed
+45560 -167

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
var concat = require('concat-stream')
function MemoryStorage (opts) {}
MemoryStorage.prototype._handleFile = function _handleFile (req, file, cb) {
file.stream.pipe(concat({ encoding: 'buffer' }, function (data) {
cb(null, {
buffer: data,
size: data.length
})
}))
}
MemoryStorage.prototype._removeFile = function _removeFile (req, file, cb) {
delete file.buffer
cb(null)
}
module.exports = function (opts) {
return new MemoryStorage(opts)
}