From b5a5e43e2ea7af773dba1ee99c2194be61515df8 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期四, 05 二月 2026 18:21:59 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/smart_screen

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java
index 04299d0..10f4271 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java
@@ -466,7 +466,7 @@
     }
 
     private ResponseEntity<org.springframework.core.io.Resource> downloadFile(UserFile userFile) throws IOException {
-        InputStreamResource resource =resolveResource(userFile);
+        InputStreamResource resource =userFileService.resolveResource(userFile);
         var fileSize = userFile.getSize();
 //        if(resource == null) {
 //            resource = new InputStreamResource(getClass().getClassLoader().getResourceAsStream("images/wukong.png"));
@@ -482,15 +482,6 @@
                 .body(resource);
     }
 
-    public InputStreamResource resolveResource(UserFile userFile) throws IOException {
-        var filePath = fileLocation.resolve(userFile.getName() + "." + userFile.getExtension()).normalize();
-        if(!Files.exists(filePath)){
-            return null;
-        }
-        return new InputStreamResource(Files.newInputStream(filePath));
-    }
-
-    private Path fileLocation;
 
 
 

--
Gitblit v1.7.1