Files
NapCatQQ/.pnpm-store/v3/files/91/1b8cfcaee96dbebe3b2b4e4411a4d2ad19a1b9b7c6f90f96215ffa18c17f943a7b00d22fead2882874924207e9325a256b47f0a3e1a5b11d6242d66e448e86
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
475 B
Plaintext

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)
}