@Service
public class MinioUtil
extends java.lang.Object
| Constructor and Description |
|---|
MinioUtil() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String bucketName,
java.lang.String objectName)
删除文件
|
java.io.InputStream |
download(java.lang.String bucketName,
java.lang.String objectName)
下载文件,返回stream.
|
java.lang.String |
getBucketName()
返回bucketName
|
void |
upload(java.io.InputStream inputStream,
java.lang.String objectName,
long size,
java.lang.String contentType)
上传文件到minio中
|
public java.lang.String getBucketName()
public void upload(java.io.InputStream inputStream,
java.lang.String objectName,
long size,
java.lang.String contentType)
inputStream - stream to upload.objectName - Object name to create in the bucket.size - Size of all the data that will be uploaded.contentType - Content type of the stream.public java.io.InputStream download(java.lang.String bucketName,
java.lang.String objectName)
objectName - Object name to create in the bucket.contentType - Content type of the stream.InputStreampublic void delete(java.lang.String bucketName,
java.lang.String objectName)
objectName - Object name to create in the bucket.contentType - Content type of the stream.