What is the best way to multiple file upload through a single input in nodejs express 4?
问题 I'm using nodejs with express 4. I'm trying to upload multiple file through a single input field. Also I submit my form through ajax. I'm using express-fileupload middleware for uploading files. When i upload multiple files, it works fine. But when upload a single file, it's not working. html code- <input type="file" name="attach_file" id="msg_file" multiple /> ajax code- var data = new FormData(); $.each($('#msg_file')[0].files, function(i, file) { data.append('attach_file', file); }); $