JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20205
  • Score
    100M100P100Q130659F
  • License MIT

Module for parsing multiform data

Package Exports

  • express-form-data

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-form-data) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

express-form-data

Module for parsing multiform data. Base on "connect-multiparty"

Install

npm install express-form-data

Example

var formData = require("express-form-data");
var express = require("express");
var app = express();

// parsing data with connect-multiparty. Result set on req.body and req.files
app.use(formData.parse(...connectMultipartyOptions));
// change all request body to json format
app.use(formData.json());
// create node stream.Readable from elements in req.files and add them in req.stream
app.use(formData.stream());
// union body and files
app.use(formData.union());

After this functions we can see in req:

  • req.files = {...} all files request data in connect-multiparty object format
  • req.stream = {...} all files request data in node stream object format
  • req.body = {...} all request data including files(or streams if you use .stream())