Registry / storage / multer-orm

multer-orm

JSON →
library2.0.1jsnpmunverified

A Node.js middleware for handling multipart/form-data, primarily for file uploads. Built on top of busboy for maximum efficiency. Current stable version is 2.0.1 (released 2024, maintenance mode with only critical updates). Key differentiators: simple API for single/multiple file uploads, integrates directly with Express, supports disk and memory storage. Not suitable for non-multipart forms. Release cadence: irregular, few updates since 2021. Competes with formidable and express-fileupload.

npm install multer-orm
INSTALL
IMPORT
SIG · MULTER-ORM
M
multer-orm
storagejavascriptv2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

multer
const multer = require('multer')
import multer from 'multer' (only works with ESM)
Package does not ship ESM; use dynamic import() or CJS require.
storage
const { diskStorage, memoryStorage } = require('multer')
import { diskStorage } from 'multer' (not possible in CJS, use destructuring after require)
storage engines are properties of multer object, not direct named exports.
MulterError
const { MulterError } = require('multer')
import { MulterError } from 'multer' (same CJS vs ESM issue)
Use for catching multer-specific errors.

Express server with single file upload endpoint using Multer, saving to disk.

const express = require('express'); const multer = require('multer'); const upload = multer({ dest: 'uploads/' }); const app = express(); app.post('/upload', upload.single('file'), (req, res) => { res.json({ file: req.file, body: req.body }); }); app.listen(3000);
Debug
Known issues
gotchaMulter only processes multipart forms; non-multipart forms are passed through without populating req.body or req.file.
fix
Ensure HTML form has enctype='multipart/form-data'.
affects: >=1.0.0
gotchaMulter adds file objects before other middleware; fields without files or empty files still create entries with same structure.
fix
Check file existence (req.file !== undefined) rather than truthiness.
affects: >=1.0.0
gotchareq.body may be partially populated if files are missing or invalid; multer does not abort on missing fields by default.
fix
Use appropriate multer method (single, array, fields) matching the form structure.
affects: >=1.0.0
deprecatedMulter v1.x is no longer maintained; upgrade to v2.x (same API but critical fixes).
fix
Run npm install multer@latest.
affects: >=1.0.0 <2.0.0
gotchaDisk storage destinations must exist; multer does not create directories automatically.
fix
Use fs.mkdirSync or a helper to create directories before saving.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Multipart: Boundary not found
Request is not multipart or missing Content-Type header with boundary.
fix
Ensure form has enctype='multipart/form-data' and request content-type is set correctly.
Error: Unexpected field
Form field name doesn't match expected in multer config.
fix
Use upload.single('exactFieldName') or upload.fields([{ name: 'expectedName' }]).
Cannot read properties of undefined (reading 'file')
Multer middleware not applied or req.file is undefined when using upload.none().
fix
Verify multer is used before route handler and correct method (single vs none).
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
busboyrequiredcore parsing engine for multipart streams
Agent activity
25 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
multer-orm — npm install multer-orm · libregistry