修改文件访问路径
This commit is contained in:
parent
a7f2ec25d2
commit
a61e9074eb
|
|
@ -285,12 +285,16 @@ public class MinioUtil {
|
||||||
*/
|
*/
|
||||||
@SneakyThrows(Exception.class)
|
@SneakyThrows(Exception.class)
|
||||||
public String getFileUrl(String bucketName, String objectName, int expiryTimeInSeconds) {
|
public String getFileUrl(String bucketName, String objectName, int expiryTimeInSeconds) {
|
||||||
return minioClient.getPresignedObjectUrl(GetPresignedObjectUrlArgs.builder()
|
try{
|
||||||
.bucket(bucketName)
|
return minioClient.getPresignedObjectUrl(GetPresignedObjectUrlArgs.builder()
|
||||||
.object(objectName)
|
.bucket(bucketName)
|
||||||
.expiry(expiryTimeInSeconds)
|
.object(objectName)
|
||||||
.method(Method.GET)
|
.expiry(expiryTimeInSeconds)
|
||||||
.build());
|
.method(Method.GET)
|
||||||
|
.build());
|
||||||
|
}catch (Exception e){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue