javascript - Node.js connect-multiparty catch Error: maximum file length exceeded -


i want limit file upload size , inform user exceeding limit, don't know should catch error.

limit setting:

var multipart = require('connect-multiparty'); var multipartmiddleware = multipart({     maxfilessize : 2 * 1024 }); 

upload post:

app.post('/upload', multipartmiddleware, function (req, res) { 


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo