@RestController
@RequestMapping("/antdUpload")
public class AntdUpload {
private Logger logger = LoggerFactory.getLogger(AntdUpload.class);
@RequestMapping(method = RequestMethod.PUT)
public void postExcel(@RequestParam("file")MultipartHttpServletRequest request, HttpServletResponse response) throws IOException {
logger.info("antd-upload");
//1. build an iterator
Iterator<String> itr = request.getFileNames();
MultipartFile mpf = null;
//2. get each file
while (itr.hasNext()) {
//2.1 get next MultipartFile
mpf = request.getFile(itr.next());
InputStream is = mpf.getInputStream();
}
}
}
结果后台根本收不到请求,不知道是什么问题?
添加回答
举报
0/150
提交
取消