将string类型地址转换为File和MultipartFile
local: 字符串地址File file = new File(local);FileInputStream input = new FileInputStream(file);MultipartFile multipartFile =new MockMultipartFile("file", file.getName(),"text/plain",IOUtils.toByteArray(input));依赖<dependency> <groupI.
原创
2021-09-27 18:12:24 ·
4602 阅读 ·
0 评论