@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();
}
}
}
as a result, there is no request at all in the backend. I don"t know what the problem is.