TASK:workspace、design模块代码;

This commit is contained in:
shahaibo
2023-09-20 16:02:57 +08:00
parent d3530f0af9
commit 49b62d3733
12 changed files with 97 additions and 58 deletions

View File

@@ -279,6 +279,16 @@ public class MinioUtil {
}
}
public String getPresignedUrl(String path, int expiry) {
if (!path.contains("/")) {
throw new BusinessException("The path is error!");
}
int index = path.indexOf("/");
String bucketName = path.substring(0, index);
String fileName = path.substring(index + 1);
return getPresignedUrl(bucketName, fileName, expiry);
}
/**
* 将桶名、文件名从url中分离出来
* @param url 带桶名、文件名的url