Simple way to upload image with node.js and express?
问题 I've found few articles explaining the process but most of them are not up do date. How do you handle image upload in node.js? 回答1: I use busboy middleware in express to parse out images in a multipart/form-data request and it works pretty nice. My code looks something like: const busboy = require('connect-busboy'); //... app.use(busboy()); app.use(function parseUploadMW(req,res,next){ req.busboy.on('file', function onFile(fieldname, file, filename, encoding, mimetype) { file.fileRead = [];