fix - 文件分类

This commit is contained in:
2026-05-19 15:44:46 +08:00
parent 0907912773
commit 95e934c994
3 changed files with 5 additions and 8 deletions

View File

@@ -15,7 +15,6 @@ spring:
profiles: profiles:
include: include:
-development -development
-test
-production -production
active: development active: development

View File

@@ -17,7 +17,6 @@ spring:
profiles: profiles:
include: include:
-development -development
-test
-production -production
active: development active: development

View File

@@ -97,7 +97,7 @@ public class OSSClientUtil {
boolean uploadResult = ossClient.doesObjectExist(bucketName, backUrl); boolean uploadResult = ossClient.doesObjectExist(bucketName, backUrl);
if (uploadResult) { if (uploadResult) {
backUrl = getImgUrl(name); backUrl = getImgUrl(path,name);
} else { } else {
backUrl = ""; backUrl = "";
} }
@@ -191,13 +191,12 @@ public class OSSClientUtil {
/** /**
* 获得图片路径 * 获得图片路径
* *
* @param fileUrl
* @return * @return
*/ */
public String getImgUrl(String fileUrl) { public String getImgUrl(String filePath,String filename) {
if (!StringUtils.isEmpty(fileUrl)) { if (!StringUtils.isEmpty(filename)) {
String[] split = fileUrl.split("/"); String[] split = filename.split("/");
return url + this.imageDir + split[split.length - 1]; return url + filePath + split[split.length - 1];
} }
return null; return null;
} }