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

This commit is contained in:
396572590@qq.com
2022-07-15 22:23:09 +08:00
parent 1f29f48bc7
commit 1c7ead8867
@@ -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);