multipartFile设置获取OriginalFilename
注:MockMultipartFile
public MultipartFileResp xx(File file) {
...
FileInputStream inputStream = new FileInputStream(file);
MultipartFile multipartFile = new MockMultipartFile("File",file.getName(),"text/plain", inputStream);
log.info("[test] getOriginalFilename={}",multipartFile.getOriginalFilename());
...
}
MultipartFile
网友评论