|
|
|
@@ -789,7 +789,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResponseEntity<InputStreamResource> downloadAllModelFilesNew(String identifier, Integer id, String version) throws Exception { |
|
|
|
public ResponseEntity<InputStreamResource> downloadAllModelFilesNew(String name, String identifier, Integer id, String version) throws Exception { |
|
|
|
// 命令行操作 git clone 项目地址 |
|
|
|
LoginUser loginUser = SecurityUtils.getLoginUser(); |
|
|
|
String ci4sUsername = loginUser.getUsername(); |
|
|
|
@@ -820,7 +820,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
InputStreamResource resource = new InputStreamResource(new FileInputStream(zipFile)); |
|
|
|
|
|
|
|
return ResponseEntity.ok() |
|
|
|
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + identifier + "_" + version + "_model.zip") |
|
|
|
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + name + "_" + version + "_model.zip") |
|
|
|
.contentType(MediaType.APPLICATION_OCTET_STREAM) |
|
|
|
.contentLength(zipFile.length()) |
|
|
|
.body(resource); |
|
|
|
|