paynestrike paynestrike - 2 years ago 172
Node.js Question

How to limit upload file size in express.js

i got this error says

error:request entity too large

when uploading a video about 30MB,

here is the setting code

maxFieldsSize:'2 * 1024 * 1024 * 1024 ',

am not sure how to set the maxFieldsSize property, need some help!!!

Answer Source

Express uses connect middleware, you can specify the file upload size by using the following


Connect Limit middleware

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download