类 OSSFileUploaderComponent
java.lang.Object
com.publiccms.logic.component.OSSFileUploaderComponent
- 所有已实现的接口:
Cache
,FileUploader
,SiteCache
OSSFileUploaderComponent 对象存储上传组件
-
字段概要
字段修饰符和类型字段说明private CacheEntity<Short,
software.amazon.awssdk.services.s3.S3Client> private ConfigDataComponent
private CacheEntity<Short,
software.amazon.awssdk.services.s3.presigner.S3Presigner> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
clear()
void
clear
(short siteId) boolean
enablePrefix
(short siteId, boolean privatefile) boolean
enableUpload
(short siteId, boolean privatefile) static boolean
enableUpload
(Map<String, String> config, boolean privatefile) software.amazon.awssdk.services.s3.S3Client
getPrefix
(short siteId, boolean privatefile) software.amazon.awssdk.services.s3.presigner.S3Presigner
getPresigner
(short siteId, Map<String, String> config) getPrivateFileUrl
(short siteId, int expiryMinutes, String filepath) void
initCache
(CacheEntityFactory cacheEntityFactory) upload
(short siteId, org.springframework.web.multipart.MultipartFile file, boolean privatefile, String filepath, Locale locale)
-
字段详细资料
-
configDataComponent
-
cache
-
presignerCache
-
-
构造器详细资料
-
OSSFileUploaderComponent
public OSSFileUploaderComponent()
-
-
方法详细资料
-
getPresigner
-
getClient
-
enableUpload
public boolean enableUpload(short siteId, boolean privatefile) - 指定者:
enableUpload
在接口中FileUploader
-
enablePrefix
public boolean enablePrefix(short siteId, boolean privatefile) - 指定者:
enablePrefix
在接口中FileUploader
-
enableUpload
-
getPrivateFileUrl
- 指定者:
getPrivateFileUrl
在接口中FileUploader
-
getPrefix
- 指定者:
getPrefix
在接口中FileUploader
-
upload
public FileUploadResult upload(short siteId, org.springframework.web.multipart.MultipartFile file, boolean privatefile, String filepath, Locale locale) throws IOException - 指定者:
upload
在接口中FileUploader
- 抛出:
IOException
-
upload
public FileUploadResult upload(short siteId, byte[] file, boolean privatefile, String filepath, Locale locale) throws IOException - 指定者:
upload
在接口中FileUploader
- 抛出:
IOException
-
clear
public void clear() -
clear
public void clear(short siteId) -
initCache
public void initCache(CacheEntityFactory cacheEntityFactory) throws ClassNotFoundException, InstantiationException, IllegalAccessException - 参数:
cacheEntityFactory
-- 抛出:
IllegalAccessException
InstantiationException
ClassNotFoundException
-
getCacheCode
- 指定者:
getCacheCode
在接口中FileUploader
-