Description
express-fileupload is a simple middleware for Express that handles file uploads, built on the busboy parser. When a request includes a file, the middleware exposes it on req.files under the name of the form input, so an input named foo arrives as req.files.foo. Each file object gives you its name, mimetype, size and an md5 value, along with a mv method that moves the file to a path on your server, and a data buffer with its contents. If the useTempFiles option is set, the buffer is empty and the file is written to a temporary path given by tempFilePath. A truncated flag shows when a file went over the size limit. The README explains how the md5 property changed across major versions, so check it when upgrading. You add the middleware to an Express app as described in the install and usage sections. The maintainer says the package is still supported and maintained, and asks for help with issue triage, feature scoping and maintenance such as upgrading packages and fixing security issues.…
Highlights
- Express middleware for multipart file uploads
- Files exposed on req.files
- mv method to save files on the server
- Temporary file option for large uploads
- Built on busboy
Ratings & Reviews
No ratings yet
Be the first to rate Express Fileupload.
People also visit
Next Runtime
All you need to handle POST requests, file uploads, and api requests
Express Fileupload FAQ
What is express-fileupload?
Middleware for Express that handles file uploads and wraps the busboy parser.
How do I access an uploaded file?
Files appear on req.files under the form input's name. For an input called foo, use req.files.foo, which has name, mimetype, size, md5, data and mv.
What does the useTempFiles option do?
With it on, the data buffer is empty and the file is written to a temporary path, given by tempFilePath.
Why did the md5 field change?
The README lists the breaking changes: md5 was a checksum before 1.0.0, a function from 1.0.0 to 1.1.1, and a checksum again from 1.1.1 on.
Is the project maintained?
The README says it is still supported and maintained, and asks for help with triage, feature scoping and maintenance.
What are the best Express Fileupload alternatives?
Popular alternatives to Express Fileupload include WeTransfer. See all Express Fileupload alternatives










