Socket
Socket
Sign inDemoInstall

express-formparse7

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-formparse7

An Express middleware that uses Formidable to parse incoming multi-part forms. Updated for Node 7/8/9


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

express-formparse7

An Express middleware that uses Formidable to parse incoming multi-part forms.

What are Express, Formidable, and this?

Express is a fast, unopinionated, minimalist web framework for Node.js.

Formidable is a Node.js module for parsing form data, especially file uploads.

So, express-formparse is something like a bridge between them, specifically an Express middleware implementation of Formidable.

Install

npm i -S express-formparse7

How

const express = require('express');
const formparse = require('express-formparse');

const app = express();

app.use(formparse.parse({
    encoding: 'utf8',
    uploadDir: 'tmp_upload',
    keepExtensions: true,
    hash: 'md5',
    multiples: true,
}));

app.post('/upload', (req, res) => {
  // req.body will contain the parsed form
  // req.files will contain file metadata
});
formparse.parse([options])

The keys and values in options will be directly passed to the formidable IncomingForm. (See node-formidable API for reference).

Only requests having a multipart/form-data content-type will be parsed.

License

MIT

Keywords

FAQs

Package last updated on 19 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc