Merge branch 'develop_migration' into 'develop_master'

feat: There is no way the,  工作流文件下载

See merge request LiuChao/foton-slrs-system-rest!554
This commit is contained in:
super_liu
2022-07-15 22:26:17 +08:00
@@ -57,6 +57,12 @@ public class WorkFlowController {
@Value("${stand.edit.file.path}")
private String standEditFilePath;
/**
* 文件下载路径
*/
@Value("${file.downloadUrl}")
private String downloadUrl;
@Autowired
private JwtUtils jwtUtils;
@@ -78,7 +84,7 @@ public class WorkFlowController {
String fileOldName = fileNameEncoding(oldFileName,request);
response.setHeader("Content-Disposition", "attachment;filename=\""+fileOldName+"\"");
response.setContentType("application/octet-stream");
File file = new File(standEditFilePath+modelHisOne.getEditFilePath());
File file = new File(downloadUrl+modelHisOne.getEditFilePath());
is = new FileInputStream(file);
os = response.getOutputStream();
org.apache.commons.io.IOUtils.copy(is, os);