tunnckoCore / opensource

Delivering delightful digital solutions. Monorepo of monorepos of Open Source packages with combined ~100M/month downloads, semantically versioned following @conventional-commits. Fully powered ES Modules, @Airbnb @ESLint + @Prettier, independent & fixed versioning. Quality with @Actions, CodeQL, & Dependabot.
https://tunnckocore.com/opensource
481 stars 18 forks source link

Tests and update the `multipart` and `formidable` recipes #47

Open tunnckoCore opened 8 years ago

tunnckoCore commented 8 years ago

There may need more tests, PRs are always welcome.

Update formidable recipe

var form = new IncomingForm()
form.on('file', console.log)

app.use(body({
  IncomingForm: form,
  keepExtensions: true,
  uploadDir: path.join(__dirname, 'uploads')
}))

instead of these two ways of doing it

first

var form = new IncomingForm({
  keepExtensions: true
  // etc
})

second (as in recipe and as in formidable README)

var form = new IncomingForm()
form.keepExtensions = true
tunnckoCore commented 8 years ago

finish form recipe