public class MinioWorker extends Object implements StorageWorker
log, SUFFIX_BACKUP, SUFFIX_THUMBNAIL, TYPE_CACHE| 构造器和说明 |
|---|
MinioWorker(MinioProperties minioProperties) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
copyObject(String originPath,
String target,
boolean isPublic)
相同桶间文件复制
|
String |
crateFileExpireUrl(String path,
int expire)
<创建一个指定有效期的数据访问链接>
|
boolean |
deleteFile(String path)
根据路径删除文件
|
String |
doUpload(File file,
String bucket,
String path)
待实现的文件上传接口
|
String |
doUpload(InputStream stream,
String bucket,
String path,
String originName)
待实现的文件上传接口
|
InputStream |
download(String key)
下载文件
|
String |
getBucket(boolean isPublic) |
String |
getEndpoint() |
Map<String,String> |
preSignUpload(PreSingUploadParam param)
预签名上传
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendSuffix, backupFile, buildThumbnail, contentTypeByFileName, createImgExpireUrl, createImgExpireUrl, download, generatePath, generatePath, getPublicBucket, getPublicDocumentUrl, suffixByContentType, upload, upload, upload, upload, upload, upload, upload, uploadFromUri, uploadMultipleFilepublic MinioWorker(MinioProperties minioProperties)
public String doUpload(InputStream stream, String bucket, String path, String originName)
StorageWorkerdoUpload 在接口中 StorageWorkerstream - 文件流path - 远程路径public String doUpload(File file, String bucket, String path)
StorageWorkerdoUpload 在接口中 StorageWorkerfile - 文件path - 远程路径public InputStream download(String key)
StorageWorkerdownload 在接口中 StorageWorkerkey - 文件路径public String copyObject(String originPath, String target, boolean isPublic)
StorageWorkercopyObject 在接口中 StorageWorkeroriginPath - 源路径target - 目标路径isPublic - 是否公开库public String getEndpoint()
getEndpoint 在接口中 StorageWorkerpublic String getBucket(boolean isPublic)
getBucket 在接口中 StorageWorkerpublic String crateFileExpireUrl(String path, int expire)
StorageWorkercrateFileExpireUrl 在接口中 StorageWorkerpath - oss存储路径expire - 有效时间(s)public Map<String,String> preSignUpload(PreSingUploadParam param)
StorageWorkerpreSignUpload 在接口中 StorageWorkerparam - 预签名参数public boolean deleteFile(String path)
StorageWorkerdeleteFile 在接口中 StorageWorkerpath - 1Copyright © 2025. All rights reserved.