mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-04-12 02:57:22 +00:00
修复 视频格式 转换模式和预览模式 特征码通用的问题 修复压缩包创建带文件名的文件夹
This commit is contained in:
@@ -19,6 +19,7 @@ public enum FileType {
|
||||
CODE("codeFilePreviewImpl"),
|
||||
OTHER("otherFilePreviewImpl"),
|
||||
MEDIA("mediaFilePreviewImpl"),
|
||||
MEDIACONVERT("mediaFilePreviewImpl"),
|
||||
MARKDOWN("markdownFilePreviewImpl"),
|
||||
XML("xmlFilePreviewImpl"),
|
||||
CAD("cadFilePreviewImpl"),
|
||||
@@ -50,7 +51,7 @@ public enum FileType {
|
||||
private static final String[] SSIM_TEXT_TYPES = ConfigConstants.getSimText();
|
||||
private static final String[] CODES = {"java", "c", "php", "go", "python", "py", "js", "html", "ftl", "css", "lua", "sh", "rb", "yaml", "yml", "json", "h", "cpp", "cs", "aspx", "jsp", "sql"};
|
||||
private static final String[] MEDIA_TYPES = ConfigConstants.getMedia();
|
||||
public static final String[] MEDIA_TYPES_CONVERT = ConfigConstants.getConvertMedias();
|
||||
public static final String[] MEDIACONVERT_TYPES_CONVERT = ConfigConstants.getConvertMedias();
|
||||
private static final Map<String, FileType> FILE_TYPE_MAPPER = new HashMap<>();
|
||||
|
||||
static {
|
||||
@@ -69,8 +70,8 @@ public enum FileType {
|
||||
for (String media : MEDIA_TYPES) {
|
||||
FILE_TYPE_MAPPER.put(media, FileType.MEDIA);
|
||||
}
|
||||
for (String media : MEDIA_TYPES_CONVERT) {
|
||||
FILE_TYPE_MAPPER.put(media, FileType.MEDIA);
|
||||
for (String MEDIACONVERT : MEDIACONVERT_TYPES_CONVERT) {
|
||||
FILE_TYPE_MAPPER.put( MEDIACONVERT, FileType. MEDIACONVERT);
|
||||
}
|
||||
for (String tif : TIFF_TYPES) {
|
||||
FILE_TYPE_MAPPER.put(tif, FileType.TIFF);
|
||||
|
||||
Reference in New Issue
Block a user