fix 修复 minio 上传, 因 socket 导致 available 获取数值不精确问题

This commit is contained in:
疯狂的狮子Li 2022-04-08 19:43:07 +08:00
parent 517c5705b6
commit 94b09c3fc0
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ public class MinioOssStrategy extends AbstractOssStrategy {
@Override
public UploadResult upload(InputStream inputStream, String path, String contentType) {
try {
// 解决 inputStream.available() socket 下传输延迟问题 导致获取数值不精确
Thread.sleep(1000);
minioClient.putObject(PutObjectArgs.builder()
.bucket(properties.getBucketName())
.object(path)