Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 26, 2024 via pnpm

form-data 2.1.4

A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
Package summary
Share
0
issues
1
license
6
MIT
Package created
16 May 2011
Version published
9 Apr 2017
Maintainers
5
Total deps
6
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
6 Packages, Including:
asynckit@0.4.0
combined-stream@1.0.8
delayed-stream@1.0.0
form-data@2.1.4
mime-db@1.52.0
mime-types@2.1.35
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of form-data 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
asynckit0.4.07.92 kBMIT
prod
combined-stream1.0.83.97 kBMIT
prod
mime-types2.1.355.46 kBMIT
prod

Visualizations

Frequently Asked Questions

What does form-data do?

Form-Data is a popular npm package that predominantly aids web developers in creating readable multipart/form-data streams. Useful in the submission of forms and file uploads to other web applications, the Form-Data library is inspired by the XMLHttpRequest-2 FormData Interface. By employing this dynamic library, developers can construct forms with a variety of fields encompassing not only strings, but also buffers and file streams.

How do you use form-data?

To utilize the Form-Data library, developers need to first install it via npm using the command npm install --save form-data.

Code usage examples in JavaScript are as follows:

Constructing a form with three fields:

var FormData = require('form-data');
var fs = require('fs');

var form = new FormData();
form.append('my_field', 'my value');
form.append('my_buffer', new Buffer(10));
form.append('my_file', fs.createReadStream('/foo/bar.jpg'));

Using http-response stream:

var FormData = require('form-data');
var http = require('http');

var form = new FormData();

http.request('http://nodejs.org/images/logo.png', function(response) {
  form.append('my_field', 'my.value');
  form.append('my_buffer', new Buffer(10));
  form.append('my_logo', response);
});

Submitting the form to a web application:

form.submit('http://example.org/', function(err, res) {
  // res – response object (http.IncomingMessage)  //
  res.resume();
});

Where are the form-data docs?

The extensive documentation for the Form-Data library can be found on the GitHub page. Not only does it provide a myriad of usage examples, but it also includes a list of available options, outlines several alternative submission methods, and details the methods available within the library. It serves as an exceptional resource for anyone seeking to understand or implement the Form-Data library.