# expressjs/multer

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/expressjs-multer).**

12,055 stars · 1,116 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/expressjs/multer
- Homepage: https://www.npmjs.com/package/multer
- awesome-repositories: https://awesome-repositories.com/repository/expressjs-multer.md

## Description

Multer is a multipart form parser and file upload manager designed as middleware for Node.js and Express.js applications. It extracts text fields and uploaded files from incoming requests to populate the request body and file objects for server-side use.

The project utilizes pluggable storage engines to abstract file persistence, allowing developers to switch between saving files to a physical disk or holding them as buffers in system memory. It supports customizable file naming strategies and a custom storage engine interface for defining how files are saved and deleted.

The middleware includes resource protection utilities that enforce maximum thresholds on file sizes and field counts. It also provides a request validator that evaluates uploaded files against custom predicate functions to accept or reject specific files before they are stored.

## Tags

### Web Development

- [Multipart Form Parsing](https://awesome-repositories.com/f/web-development/multipart-upload-utilities/multipart-form-parsing.md) — Parses multipart/form-data requests to extract files and text fields for server-side use. ([source](https://github.com/expressjs/multer#readme))
- [File Storage Engines](https://awesome-repositories.com/f/web-development/file-storage-engines.md) — Provides pluggable storage engines to abstract file persistence, allowing switches between physical disk storage and memory buffers.
- [File Upload Management](https://awesome-repositories.com/f/web-development/file-upload-management.md) — Manages file uploads in Express applications by processing text fields and files from incoming requests.
- [File Uploads](https://awesome-repositories.com/f/web-development/file-uploads.md) — Handles the ingestion of single or multiple files and mixed fields within multipart form requests. ([source](https://github.com/expressjs/multer/blob/main/doc/README-pt-br.md))
- [Streamed Parsing](https://awesome-repositories.com/f/web-development/multipart-upload-utilities/multipart-form-parsing/streamed-parsing.md) — Parses incoming request streams incrementally to extract data without loading full payloads into memory.
- [Request Middleware](https://awesome-repositories.com/f/web-development/request-middleware.md) — Implements middleware that intercepts requests to attach parsed files and fields to the request object.
- [Incoming File Filters](https://awesome-repositories.com/f/web-development/file-uploads/incoming-file-filters.md) — Evaluates uploaded files against custom criteria to accept or reject specific types before storage.
- [Upload File Filtering](https://awesome-repositories.com/f/web-development/file-uploads/upload-file-filtering.md) — Evaluates each uploaded file against custom logic to determine if it should be accepted or skipped. ([source](https://github.com/expressjs/multer#readme))

### Data & Databases

- [Local File Storage](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/file-based-storage/local-file-storage.md) — Saves uploaded files to local disk directories or maintains them as memory buffers.
- [File-Based Storage Systems](https://awesome-repositories.com/f/data-databases/file-based-storage-systems.md) — Persists uploaded files to the local filesystem for permanent storage. ([source](https://github.com/expressjs/multer/blob/main/doc/README-pt-br.md))
- [Upload Filters](https://awesome-repositories.com/f/data-databases/result-ordering-and-limiting/file-listing-filters/upload-filters.md) — Evaluates uploaded file metadata against custom predicate functions to filter accepted files.

### Software Engineering & Architecture

- [Memory Buffering](https://awesome-repositories.com/f/software-engineering-architecture/memory-buffering.md) — Holds uploaded files as buffer objects in volatile memory for immediate programmatic processing. ([source](https://github.com/expressjs/multer/blob/main/doc/README-ar.md))
- [Storage Engine Interfaces](https://awesome-repositories.com/f/software-engineering-architecture/storage-engine-interfaces.md) — Provides an abstraction layer to decouple file upload logic from specific storage implementations like disk or memory.
- [Disk-Memory Thresholds](https://awesome-repositories.com/f/software-engineering-architecture/memory-buffering/disk-memory-thresholds.md) — Determines whether to store files as memory buffers or write them to disk based on size limits.
- [Storage Filename Strategies](https://awesome-repositories.com/f/software-engineering-architecture/naming-conventions/file/storage-filename-strategies.md) — Defines destination folders and final filenames for saved files to prevent naming conflicts. ([source](https://github.com/expressjs/multer/blob/main/doc/README-zh-cn.md))

### Security & Cryptography

- [Upload Request Validation](https://awesome-repositories.com/f/security-cryptography/file-upload-security/upload-request-validation.md) — Provides a request validator to enforce file size limits and filter accepted files using custom predicate functions.
- [Service Abuse Protections](https://awesome-repositories.com/f/security-cryptography/governance-policy-frameworks/security-infrastructure/service-abuse-protections.md) — Prevents resource exhaustion and service abuse by limiting the size and quantity of uploaded files.

### System Administration & Monitoring

- [Request Size Limits](https://awesome-repositories.com/f/system-administration-monitoring/resource-constraints/request-size-limits.md) — Protects the server from denial-of-service attacks by enforcing maximum file sizes and field counts.

### User Interface & Experience

- [Server-Side Upload Constraints](https://awesome-repositories.com/f/user-interface-experience/file-uploaders/asynchronous-uploaders/server-side-upload-constraints.md) — Enforces maximum thresholds on file sizes and field counts to protect the server from resource abuse. ([source](https://github.com/expressjs/multer/blob/main/doc/README-fr.md))
