打印/下载
使用

引入

import vip.webmis.java.library.Upload;

单文件上传

@RequestMapping("/upFile")
String upFile(String token, String path, @RequestParam("up") MultipartFile file) {
  HashMap<String, Object> params = new HashMap<String, Object>();
  params.put("path","upload/");
  params.put("bind",null);
  HashMap<String, Object> res = Upload.file(file,params);
}
  • cfg.put("path", "upload/"); // 上传目录
  • cfg.put("filename", ""); // 文件名
  • cfg.put("bind", bind); // 允许格式

Base64上传

HashMap<String, Object> param = new HashMap<String, Object>();
param.put("path","upload/");
param.put("base64",base64);
HashMap<String, Object> res = Upload.base64(param);
  • cfg.put("path", "upload/"); //上传目录
  • cfg.put("base64", ""); //文件内容
  • cfg.put("filename", ""); //文件名
  • cfg.put("ext", "png"); //后缀
{{copy}}