FIie类型转MultipartFile
File filexxx = new File(“文件路径”);
FileInputStream fileInputStream = new FileInputStream(filexxx);
MultipartFile multipartFile = new MockMultipartFile(filexxx.getName(), filexxx.getName(),
ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
网友评论