|
|
|
@ -25,6 +25,10 @@ public class uploadController {
|
|
|
|
|
|
|
|
|
|
@Value("${file_path}")
|
|
|
|
|
private String filePath;
|
|
|
|
|
@Value("${file_url}")
|
|
|
|
|
private String fileUrl;
|
|
|
|
|
@Value("${file_lpath}")
|
|
|
|
|
private String fileLpath;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 上传PDF模板
|
|
|
|
@ -117,6 +121,7 @@ public class uploadController {
|
|
|
|
|
}
|
|
|
|
|
String newName = UUID.randomUUID() + fileType;//生成新文件名
|
|
|
|
|
String savePath = filePath + "/register/" + type;
|
|
|
|
|
String savePath1 = fileLpath + "?type=" + type;
|
|
|
|
|
|
|
|
|
|
File file1 = new File(savePath);
|
|
|
|
|
if (!file1.exists()) {// 判断目录是否存在
|
|
|
|
@ -127,7 +132,7 @@ public class uploadController {
|
|
|
|
|
file.transferTo(file1);
|
|
|
|
|
Map<String, String> rMap = new HashMap<>();
|
|
|
|
|
rMap.put("msg", "上传成功");
|
|
|
|
|
rMap.put("name", newName);
|
|
|
|
|
rMap.put("name", fileUrl + savePath1 + "&name=" + newName);
|
|
|
|
|
rMap.put("type", type);
|
|
|
|
|
return ResultVOUtils.success(rMap);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|