Service for uploading multiple file using multer in node.js
问题 I have created class named FileUpload and made one function to upload multiple files using multer.I want to use this method in controller but i cannot to do so. i can not get other fields from request. Here is the FileUpload class : var multer = require('multer'); class FileUpload{ constructor(){ this.storage = null; this.filepath = null; this.upload = null; } uploadMultipleFile(req,res,path){ this.filepath = path; this.storage = multer.diskStorage({ destination : (req,file,callback) =>{