使 egg-multipart 同时支持 stream 和 file
2020-04-07 12:39
2061 查看
项目中,上传图片是通过 stream,上传excel是通过file 接受的
config.multipart = { // fileSize: '50mb', // 文件大小 fileModeMatch: /^(\/tools\/excel\/import)$/, // '/tools/excel/import'接口使用file模式,其他使用stream模式 fileExtensions: ['.xlsx', '.xls'], }
.