From fe512841e70c9dae6097251aa65708fe18314ae2 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 15 四月 2025 19:41:57 +0800
Subject: [PATCH] 对象存储地址修改为bendudu的&一个接口--将原本存在本地的文件图片上传到存储桶中

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/CosController.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/CosController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/CosController.java
index 896b427..f046916 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/CosController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/CosController.java
@@ -30,7 +30,10 @@
         }
         System.out.println("dfsdgd");
         HashMap<String,String> map = new HashMap<>();
-        map.put("key",key);
+
+        int dotIndex = key.lastIndexOf('/');
+        map.put("key", key.substring(dotIndex + 1));
+        map.put("path",key);
         return AjaxResult.success(map);
     }
 
@@ -86,6 +89,6 @@
             throw new RuntimeException(e);
         }
 
-        return AjaxResult.success("鏂囦欢涓婁紶鎴愬姛");
+        return AjaxResult.success("鏂囦欢鍒犻櫎鎴愬姛");
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1