Commit caccb540 by songxiang

fix bug 23591

parent e17e44e4
......@@ -47,7 +47,12 @@ public enum TranscodeFromEnum {
/**
* 音频
*/
AUDIOAPP_PDF("AUDIOAPP_PDF");
AUDIOAPP_PDF("AUDIOAPP_PDF"),
/**
* 文件管理中心
*/
CONVERT_PDF("CONVERT_PDF");
/**
* 值
......
......@@ -97,14 +97,19 @@ public class FileUtils {
public final static String TEXT = "TEXT";
/**
* OFFICE
*/
public final static String OFFICE = "OFFICE";
/**
* PDF文件格式
*/
public static final String[] PDF_GATHER = {"PDF"};
public static final String[] PDF_GATHER = { "PDF" };
/**
* XML文件格式
*/
public static final String[] XML_GATHER = {"XML"};
public static final String[] XML_GATHER = { "XML" };
/**
* 图片文件格式
......@@ -114,43 +119,49 @@ public class FileUtils {
/**
* 音頻文件格式 【"LRC" 为歌词字幕(这里作为音頻文件上传)】
*/
public static final String[] AUDIO_GATHER = {"AMR", "MP3", "WMA", "WAV", "AAC", "APE", "M4A"};
public static final String[] AUDIO_GATHER = { "AMR", "MP3", "WMA", "WAV", "AAC", "APE", "M4A" };
/**
* 視頻文件格式 【"SRT", "SSA", "SMI", "SUB" 为视频“外挂型”字幕(这里作为视频文件上传)】
*/
public static final String[] VIDEO_GATHER = {"MPG", "MPEG", "AVI", "MOV", "ASF", "WMV", "NAVI", "3GP", "MKV",
"FLV", "F4V", "RMVB", "RM", "MP4", "SRT", "SSA", "SMI", "SUB", "ASX", "M3U8"};
public static final String[] VIDEO_GATHER = { "MPG", "MPEG", "AVI", "MOV", "ASF", "WMV", "NAVI", "3GP", "MKV",
"FLV", "F4V", "RMVB", "RM", "MP4", "SRT", "SSA", "SMI", "SUB", "ASX", "M3U8" };
/**
* 压缩包文件格式
*/
public static final String[] COMPRESS_GATHER = {"RAR", "ZIP"};
public static final String[] COMPRESS_GATHER = { "RAR", "ZIP" };
/**
* 文件格式
*/
public static final String[] TEXT_GATHER = {"TXT", "LRC"};
public static final String[] TEXT_GATHER = { "TXT", "LRC" };
/**
* 编辑器格式
*/
public static final String[] EDITOR_GATHER = {"DOC", "DOCX", "XLS", "XLSX", "PPT", "PPTX"};
public static final String[] EDITOR_GATHER = { "DOC", "DOCX", "XLS", "XLSX", "PPT", "PPTX" };
/**
* word格式
*/
public static final String[] WORD_GATHER = {"DOC", "DOCX"};
public static final String[] WORD_GATHER = { "DOC", "DOCX" };
/**
* excel格式
*/
public static final String[] EXCEL_GATHER = {"XLS", "XLSX", "XLSM", "XLT", "XLTX", "XLTM", "CSV"};
public static final String[] EXCEL_GATHER = { "XLS", "XLSX", "XLSM", "XLT", "XLTX", "XLTM", "CSV" };
/**
* PPT格式
*/
public static final String[] PPT_GATHER = {"PPT", "PPTX"};
public static final String[] PPT_GATHER = { "PPT", "PPTX" };
/**
* office
*/
public static final String[] OFFICE_GATHER = { "DOC", "DOCX", "PPT", "PPTX", "XLS", "XLSX", "XLSM", "XLT", "XLTX",
"XLTM", "CSV" };
/**
* 根据文件类型获取文件分类
......@@ -190,17 +201,22 @@ public class FileUtils {
if (Arrays.asList(EDITOR_GATHER).contains(fileType.toUpperCase())) {
return EDITOR;
}
// COMPRESS
// TEXT
if (Arrays.asList(TEXT_GATHER).contains(fileType.toUpperCase())) {
return TEXT;
}
// OFFICE
if (Arrays.asList(OFFICE_GATHER).contains(fileType.toUpperCase())) {
return OFFICE;
}
return null;
}
/**
* 传入文件夹路径,该方法能够实现创建整个路径
*
* @param path 文件夹路径,不包含文件名称及后缀名
* @param path
* 文件夹路径,不包含文件名称及后缀名
*/
public static boolean isDir(String filePath) {
if (StringUtil.isEmpty(filePath)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment