Files
file-online-preview/server/src/main/java/cn/keking/model/FileAttribute.java
gaoxiongzaq deb91728d4 1.修复压缩包 二级目录无法解压问题 修改压缩包生成PDF路径
2.修复PDF 带密码缓存问题 新增PDF带密码缓存方法 userToken
3.精简OFFICE 转换代码
4.精简TIF转换代码 新增TIF转换图片缓存 修复tif错误文件不自动释放内存 等待其他修复
5.修复下载方法错 特殊符号下载错误
6.调整文件名 统一方法在FileHandlerService
7.新增判断文件名是否被URL转义
2023-10-23 17:06:05 +08:00

177 lines
4.2 KiB
Java

package cn.keking.model;
import cn.keking.config.ConfigConstants;
/**
* Created by kl on 2018/1/17.
* Content :
*/
public class FileAttribute {
private FileType type;
private String suffix;
private String name;
private String url;
private String fileKey;
private String filePassword;
private boolean userToken;
private String officePreviewType = ConfigConstants.getOfficePreviewType();
private String tifPreviewType;
private Boolean skipDownLoad = false;
private Boolean forceUpdatedCache = false;
private String cacheName;
private String outFilePath;
private String fileNameFilePath;
private String cacheListName;
private boolean isHtml;
/**
* 代理请求到文件服务器的认证请求头,格式如下:
* {“username”:"test","password":"test"}
* 请求文件服务器时,会将 json 直接塞到请求头里
*/
private String kkProxyAuthorization;
public FileAttribute() {
}
public FileAttribute(FileType type, String suffix, String name, String url) {
this.type = type;
this.suffix = suffix;
this.name = name;
this.url = url;
}
public FileAttribute(FileType type, String suffix, String name, String url, String officePreviewType) {
this.type = type;
this.suffix = suffix;
this.name = name;
this.url = url;
this.officePreviewType = officePreviewType;
}
public String getFileKey() {
return fileKey;
}
public void setFileKey(String fileKey) {
this.fileKey = fileKey;
}
public String getFilePassword() {
return filePassword;
}
public void setFilePassword(String filePassword) {
this.filePassword = filePassword;
}
public boolean getUserToken() {
return userToken;
}
public void setUserToken(boolean userToken) {
this.userToken = userToken;
}
public String getOfficePreviewType() {
return officePreviewType;
}
public void setOfficePreviewType(String officePreviewType) {
this.officePreviewType = officePreviewType;
}
public FileType getType() {
return type;
}
public void setType(FileType type) {
this.type = type;
}
public String getSuffix() {
return suffix;
}
public void setSuffix(String suffix) {
this.suffix = suffix;
}
public String getName() {
return name;
}
public String getcacheName() {
return cacheName;
}
public String getcacheListName() {
return cacheListName;
}
public String getoutFilePath() {
return outFilePath;
}
public String getfileNameFilePath() {
return fileNameFilePath;
}
public boolean getisHtml() {
return isHtml;
}
public void setcacheName(String cacheName) {
this.cacheName = cacheName;
}
public void setcacheListName(String cacheListName) {
this.cacheListName = cacheListName;
}
public void setoutFilePath(String outFilePath) {
this.outFilePath = outFilePath;
}
public void setfileNameFilePath(String fileNameFilePath) {
this.fileNameFilePath = fileNameFilePath;
}
public void setisHtml(boolean isHtml) {
this.isHtml = isHtml;
}
public void setName(String name) {
this.name = name;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Boolean getSkipDownLoad() {
return skipDownLoad;
}
public void setSkipDownLoad(Boolean skipDownLoad) {
this.skipDownLoad = skipDownLoad;
}
public String getTifPreviewType() {
return tifPreviewType;
}
public void setTifPreviewType(String previewType) {
this.tifPreviewType = previewType;
}
public Boolean forceUpdatedCache() {
return forceUpdatedCache;
}
public void setForceUpdatedCache(Boolean forceUpdatedCache) {
this.forceUpdatedCache = forceUpdatedCache;
}
public String getKkProxyAuthorization() {
return kkProxyAuthorization;
}
public void setKkProxyAuthorization(String kkProxyAuthorization) {
this.kkProxyAuthorization = kkProxyAuthorization;
}
}