Browse Source

修改下载文件名

dev-restore_mount
chenzhihang 1 year ago
parent
commit
1e5c82566c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java

+ 1
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java View File

@@ -799,7 +799,7 @@ public class ModelsServiceImpl implements ModelsService {
InputStreamResource resource = new InputStreamResource(new FileInputStream(zipFile));

return ResponseEntity.ok()
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=data.zip")
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + identifier + "_" + version + "_model.zip")
.contentType(MediaType.APPLICATION_OCTET_STREAM)
.contentLength(zipFile.length())
.body(resource);


Loading…
Cancel
Save