程子的博客

想得到从未得到的东西,就要去做从未做过的事

aaaaa
  menu
47 文章
23633 浏览
0 当前访客
ღゝ◡╹)ノ❤️

MultipartFile 转换为 File


    public static File convert(MultipartFile file) throws IOException {
        File convFile = new File(file.getOriginalFilename());
        convFile.createNewFile();
        FileOutputStream fos = new FileOutputStream(convFile);
        fos.write(file.getBytes());
        fos.close();
        return convFile;
    }

标题:MultipartFile 转换为 File
作者:chengzime
地址:https://chengzime.com.cn/articles/2021/03/10/1615368897647.html