minioClient没有initiateMultipartUpload
时间: 2024-02-20 11:56:56 浏览: 245
minio-multipart-upload:使用预先签名的URL的分段上传对象
如果您使用的是Minio Java SDK,那么可以通过以下步骤执行Multipart Upload:
1. 首先,使用`minioClient`的`initiateMultipartUpload`方法来初始化Multipart Upload并获取Upload ID:
```java
InitiateMultipartUploadResponse response = minioClient.initiateMultipartUpload(initiateMultipartUploadArgs);
String uploadId = response.uploadId();
```
2. 然后,使用`minioClient`的`uploadPart`方法来上传每个部分并获取ETag:
```java
UploadPartResponse uploadPartResponse = minioClient.uploadPart(uploadPartArgs);
String eTag = uploadPartResponse.etag();
```
3. 最后,使用`minioClient`的`completeMultipartUpload`方法来完成Multipart Upload:
```java
CompleteMultipartUploadResponse completeResponse = minioClient.completeMultipartUpload(completeMultipartUploadArgs);
```
请注意,这只是一个基本的示例代码。您需要根据您的实际需求进行适当的修改。
阅读全文