项目中,上传图片是通过 stream,上传excel是通过file 接受的
config.multipart = {
// fileSize: '50mb', // 文件大小
fileModeMatch: /^(\/tools\/excel\/import)$/, // '/tools/excel/import'接口使用file模式,其他使用stream模式
fileExtensions: ['.xlsx', '.xls'],
}
.
来源:oschina
链接:https://my.oschina.net/u/4302345/blog/3222588