如何将MultipartFile转换成based4

    public String test(MultipartFile file) throws Exception{
        BASE64Encoder base64Encoder =new BASE64Encoder();
        String base64EncoderImg = file.getOriginalFilename()+","+ base64Encoder.encode(file.getBytes());
        return base64EncoderImg;
    }

通过上面的这种方式,可以将MutipartFile转换成base64

原文地址:https://www.cnblogs.com/qingmuchuanqi48/p/11839300.html