explaingit

node-formidable/formidable

7,178JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A Node.js library that parses file uploads and form data as a stream, writing files to the local filesystem, Amazon S3, Azure Blob, Google Cloud Storage, or any custom destination without loading them into memory.

Mindmap

mindmap
  root((formidable))
    What it does
      Parses file uploads
      Handles form fields
      Streaming architecture
    Upload destinations
      Local filesystem
      Amazon S3
      Azure Blob
      Google Cloud
    Features
      Plugin system
      Size limits
      Error handling
    Tech stack
      Node.js
      JavaScript
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Accept file uploads in a Node.js or Express app without running out of memory on large files

USE CASE 2

Stream uploaded files directly to Amazon S3, Azure Blob Storage, or Google Cloud Storage using the plugin interface

USE CASE 3

Build a file-hosting service with configurable size and field limits and graceful error handling

Tech stack

JavaScriptNode.js

Getting it running

Difficulty · easy Time to first run · 30min

Requires Node.js 20 or newer, versions v1 and v2 are deprecated and may have security issues.

The explanation does not mention the license type.

In plain English

formidable is a Node.js library that parses incoming form data, especially file uploads. When a browser submits a form with files attached, the data arrives in a format called multipart/form-data. Parsing this correctly, handling large files, and writing them somewhere without exhausting memory requires a dedicated library, and that is what formidable does. The library processes the incoming request as a stream, handling data as it arrives rather than loading the entire upload into memory. Parsed files can be written to the local filesystem automatically, streamed to Amazon S3, Azure Blob Storage, Google Cloud Storage, or any custom destination through a plugin interface. You get back the parsed form fields and file metadata once processing is complete. formidable works directly with Node.js's built-in HTTP module, and also integrates with frameworks like Express and Koa without requiring a separate middleware package. It includes configurable limits for file sizes and field counts, and handles errors gracefully when those limits are exceeded. The library has a plugin system for adding custom parsers or upload targets. The README reports parsing speeds in the range of 900 to 2500 megabytes per second and describes memory footprint as low because of the streaming architecture. The project was originally written for Transloadit, a service that processes uploaded images and videos, and has been tested against hundreds of gigabytes of uploads from varied clients over many years. The README cautions that versions v1 and v2 are still widely installed but have been deprecated for years and may have security issues if not configured carefully. Version 3 is the current recommended release and requires Node.js 20 or newer. A minimal experimental variant called formidable-mini is mentioned as a possible basis for a future version built on web-standard APIs. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using formidable v3 in Node.js, write an Express route that accepts multipart file uploads and saves them to the local filesystem with a 10MB size limit.
Prompt 2
Show me how to use formidable's plugin system to stream an uploaded file directly to Amazon S3 instead of saving it locally.
Prompt 3
Write a Node.js HTTP server using formidable that parses an uploaded CSV file and returns the first 10 rows as JSON.
Prompt 4
How do I configure formidable in a Koa app to limit uploads to 5 fields and 3 files at once and return a 413 error when exceeded?
Open on GitHub → Explain another repo

← node-formidable on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.