Uploadig multiple files with different requirements in multer

This page summarizes the projects mentioned and recommended in the original post on /r/node

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • multer

    Node.js middleware for handling `multipart/form-data`.

    Multer's file filter is a function with req, file and cb as args. Now file has mimetype property. So hence you can make a custom fileFilter function which would impose different size restrictions. For different storage options/location maybe you can find a workaround or you can make a custom storage engine. Heres a reference https://github.com/expressjs/multer/blob/master/StorageEngine.md

  • busboy

    A streaming parser for HTML form data for node.js

    I checked out StorageEngine and apparently , it will fix the problem with memory storage for thumbnail. But I also checked out Busboy which Multer is based on. and it looks like the File size limit functionality comes from Busboy. Like, multer get fileSize and passes it to Busboy and then busboy handles limiting the incoming data for all files. So I guess it is not possible to set multiple limit size from multer. Thanks

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts