@Component
public class FileUploadComponent
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
private ConfigDataComponent |
configDataComponent |
private SafeConfigComponent |
safeConfigComponent |
private SiteComponent |
siteComponent |
private java.util.List<FileUploader> |
uploaderList |
构造器和说明 |
---|
FileUploadComponent() |
限定符和类型 | 方法和说明 |
---|---|
void |
clearCache(short siteId) |
java.util.Set<java.lang.String> |
getCacheCodes() |
java.lang.String |
getPrefix(SysSite site) |
java.lang.String |
getPrefix(SysSite site,
java.lang.Boolean privatefile) |
java.lang.String |
getPrivateFileUrl(SysSite site,
java.lang.Integer expiryMinutes,
java.lang.String filepath,
java.lang.String filename) |
void |
initContentCover(SysSite site,
CmsContent entity) |
void |
initPlaceCover(SysSite site,
CmsPlace entity) |
void |
initUploaderList(java.util.List<FileUploader> uploaderList) |
private FileUploadResult |
thumb(short siteId,
FileUploadResult fileSize,
java.lang.String filepath,
java.lang.String suffix) |
FileUploadResult |
upload(short siteId,
byte[] file,
boolean privatefile,
java.lang.String suffix,
java.util.Locale locale) |
FileUploadResult |
upload(short siteId,
org.springframework.web.multipart.MultipartFile file,
boolean privatefile,
java.lang.String suffix,
java.util.Locale locale) |
private SiteComponent siteComponent
private ConfigDataComponent configDataComponent
private SafeConfigComponent safeConfigComponent
private java.util.List<FileUploader> uploaderList
@Autowired(required=false) public void initUploaderList(java.util.List<FileUploader> uploaderList)
public java.lang.String getPrivateFileUrl(SysSite site, java.lang.Integer expiryMinutes, java.lang.String filepath, java.lang.String filename)
public void initContentCover(SysSite site, CmsContent entity)
public java.lang.String getPrefix(SysSite site)
public java.lang.String getPrefix(SysSite site, java.lang.Boolean privatefile)
private FileUploadResult thumb(short siteId, FileUploadResult fileSize, java.lang.String filepath, java.lang.String suffix)
public FileUploadResult upload(short siteId, org.springframework.web.multipart.MultipartFile file, boolean privatefile, java.lang.String suffix, java.util.Locale locale) throws java.io.IOException
java.io.IOException
public FileUploadResult upload(short siteId, byte[] file, boolean privatefile, java.lang.String suffix, java.util.Locale locale) throws java.io.IOException
java.io.IOException
public void clearCache(short siteId)
public java.util.Set<java.lang.String> getCacheCodes()