|
|
@@ -23,11 +23,10 @@ import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
/**
|
|
|
- * @program: xxkfz-minio
|
|
|
- * @ClassName MinioUtils.java
|
|
|
- * @author: 公众号:小小开发者
|
|
|
- * @create: 2024-03-13 10:55
|
|
|
- * @description: MinIO操作工具类
|
|
|
+ * MinIO操作工具类
|
|
|
+ *
|
|
|
+ * @author 公众号:小小开发者
|
|
|
+ * @date 2024-03-13 10:55
|
|
|
**/
|
|
|
@Slf4j
|
|
|
@Component
|
|
|
@@ -469,21 +468,17 @@ public class MinioUtils {
|
|
|
.object(objectName)
|
|
|
.stream(inputStream, data.length, -1)
|
|
|
.contentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
|
|
- .build()
|
|
|
- );
|
|
|
+ .build());
|
|
|
log.info("上传文件到minio. resp.etag=[{}],resp.versionId()=[{}]", resp.etag(), resp.versionId());
|
|
|
}
|
|
|
-
|
|
|
String fileUrl = minioClient.getPresignedObjectUrl(
|
|
|
GetPresignedObjectUrlArgs.builder()
|
|
|
.method(Method.GET)
|
|
|
.bucket(bucketName)
|
|
|
.object(objectName)
|
|
|
.expiry(7, TimeUnit.DAYS)
|
|
|
- .build()
|
|
|
- );
|
|
|
-
|
|
|
-// String baseUrl = minioUrl.endsWith("/") ? minioUrl.substring(0, minioUrl.length() - 1) : minioUrl;
|
|
|
+ .build());
|
|
|
+ log.info("fileUrl=[{}]", fileUrl);
|
|
|
return fileUrl;
|
|
|
}
|
|
|
|