

You can have fine-grained control over which fields allow files and limit the number of uploaded files. It saves intermediate files either in memory or on hard disk and populates req.files object for consuming the files. Multer is an Express.js middleware that's been around since 2015. The core multipart/form-data implementation has been extracted to a separate dicer module. Instead of storing intermediate files, it provides a stream to the incoming file. It's not Express.js specific, and it saves files in temporary directory on hard disk.īusboy is an event-based streaming parser that's not tied to Express.js. It also has the most weekly downloads on npm. If saving intermediate files is alright, would you prefer them in memory or on hard disk?įormidable has been around the longest, having released its 1.0 version in 2011.Is saving intermediate files ok, or do you want to stream the files?.

Here's a guide for deciding which library suits you best. Digging through each of them and choosing which one is right for you can take time.

Some store intermediate files in hard disk or in memory. Some are meant to be used with Express.js, some as standalone. There are a few npm packages out there for reading and processing a multipart/form-data request on a Node.js server. Use Busboy for high-volume production-grade solution Use Formidable or Multer for proof of concepts and low volume
