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