PHP 7.4.33
Preview: memory.js Size: 475 B
/var/www/ai-gemini.bitkit.dk/httpdocs/node_modules/multer/storage/memory.js
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)
}

Directory Contents

Dirs: 0 × Files: 2
Name Size Perms Modified Actions
1.58 KB lrw-rw-r-- 1985-10-26 08:15:00
Edit Download
475 B lrw-rw-r-- 1985-10-26 08:15:00
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).