MCPcopy
hub / github.com/expressjs/multer / makeStandardEnv

Function makeStandardEnv

test/functionality.js:22–39  ·  view source on GitHub ↗
(cb)

Source from the content-addressed store, hash-verified

20 var cleanup = []
21
22 function makeStandardEnv (cb) {
23 temp.mkdir(function (err, uploadDir) {
24 if (err) return cb(err)
25
26 cleanup.push(uploadDir)
27
28 var storage = multer.diskStorage({
29 destination: uploadDir,
30 filename: generateFilename
31 })
32
33 cb(null, {
34 upload: multer({ storage: storage }),
35 uploadDir: uploadDir,
36 form: new FormData()
37 })
38 })
39 }
40
41 after(function () {
42 while (cleanup.length) rimraf.sync(cleanup.pop())

Callers 1

functionality.jsFile · 0.85

Calls 1

multerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…