feat: There is no way the, 工作流文件下载
This commit is contained in:
+7
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user