Browse Source

添加图片上传

dev
v-lijf43 5 months ago
parent
commit
cce76d5fdd
  1. 8
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfFileController.java

8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfFileController.java

@ -48,8 +48,12 @@ public class WfFileController extends BaseController {
log.info("新的文件名:{}", newFilename);
//将文件存储在服务器的磁盘目录中 D:\demo\files
file.transferTo(new File("D:\\mh_code\\flowable\\image\\"
+ newFilename));
// String path = System.getProperty("user.dir") + "\\images\\";
// File localFile = new File(path);
// if (!localFile.exists()) {
// localFile.mkdirs();
// }
file.transferTo(new File("E:\\mh\\install_package\\dist\\images\\" + newFilename));
Map<String, String> map = new HashMap<>(2);
map.put("url", "https://bx.mhito.net/images/"+newFilename);
map.put("fileName", originalFilename);

Loading…
Cancel
Save