TASK:workspace、design模块代码;
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user