|
@@ -19,6 +19,7 @@ public enum FileType {
|
|
CODE("codeFilePreviewImpl"),
|
|
CODE("codeFilePreviewImpl"),
|
|
OTHER("otherFilePreviewImpl"),
|
|
OTHER("otherFilePreviewImpl"),
|
|
MEDIA("mediaFilePreviewImpl"),
|
|
MEDIA("mediaFilePreviewImpl"),
|
|
|
|
+ MEDIACONVERT("mediaFilePreviewImpl"),
|
|
MARKDOWN("markdownFilePreviewImpl"),
|
|
MARKDOWN("markdownFilePreviewImpl"),
|
|
XML("xmlFilePreviewImpl"),
|
|
XML("xmlFilePreviewImpl"),
|
|
CAD("cadFilePreviewImpl"),
|
|
CAD("cadFilePreviewImpl"),
|
|
@@ -50,7 +51,7 @@ public enum FileType {
|
|
private static final String[] SSIM_TEXT_TYPES = ConfigConstants.getSimText();
|
|
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[] 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();
|
|
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<>();
|
|
private static final Map<String, FileType> FILE_TYPE_MAPPER = new HashMap<>();
|
|
|
|
|
|
static {
|
|
static {
|
|
@@ -69,8 +70,8 @@ public enum FileType {
|
|
for (String media : MEDIA_TYPES) {
|
|
for (String media : MEDIA_TYPES) {
|
|
FILE_TYPE_MAPPER.put(media, FileType.MEDIA);
|
|
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) {
|
|
for (String tif : TIFF_TYPES) {
|
|
FILE_TYPE_MAPPER.put(tif, FileType.TIFF);
|
|
FILE_TYPE_MAPPER.put(tif, FileType.TIFF);
|