Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-fileview
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
梁杰芳
slm-fileview
Commits
b86515a9
Commit
b86515a9
authored
Apr 15, 2021
by
gaoxiong
Committed by
kl
Jun 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加OFD功能
parent
1ba8c31d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
FileType.java
server/src/main/java/cn/keking/model/FileType.java
+6
-1
No files found.
server/src/main/java/cn/keking/model/FileType.java
View file @
b86515a9
...
...
@@ -23,13 +23,15 @@ public enum FileType {
XML
(
"xmlFilePreviewImpl"
),
FLV
(
"flvFilePreviewImpl"
),
CAD
(
"cadFilePreviewImpl"
),
TIFF
(
"tiffFilePreviewImpl"
);
TIFF
(
"tiffFilePreviewImpl"
),
OFD
(
"ofdFilePreviewImpl"
);
private
static
final
String
[]
OFFICE_TYPES
=
{
"docx"
,
"wps"
,
"doc"
,
"xls"
,
"xlsx"
,
"ppt"
,
"pptx"
};
private
static
final
String
[]
PICTURE_TYPES
=
{
"jpg"
,
"jpeg"
,
"png"
,
"gif"
,
"bmp"
,
"ico"
,
"raw"
};
private
static
final
String
[]
ARCHIVE_TYPES
=
{
"rar"
,
"zip"
,
"jar"
,
"7-zip"
,
"tar"
,
"gzip"
,
"7z"
};
private
static
final
String
[]
TIFF_TYPES
=
{
"tif"
,
"tiff"
};
private
static
final
String
[]
OFD_TYPES
=
{
"ofd"
};
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"
,
"yml"
,
"json"
,
"h"
,
"cpp"
,
"cs"
,
"aspx"
,
"jsp"
};
private
static
final
String
[]
MEDIA_TYPES
=
ConfigConstants
.
getMedia
();
...
...
@@ -61,6 +63,9 @@ public enum FileType {
for
(
String
code
:
CODES
)
{
FILE_TYPE_MAPPER
.
put
(
code
,
FileType
.
CODE
);
}
for
(
String
ofd
:
OFD_TYPES
)
{
FILE_TYPE_MAPPER
.
put
(
ofd
,
FileType
.
OFD
);
}
FILE_TYPE_MAPPER
.
put
(
"md"
,
FileType
.
MARKDOWN
);
FILE_TYPE_MAPPER
.
put
(
"xml"
,
FileType
.
XML
);
FILE_TYPE_MAPPER
.
put
(
"pdf"
,
FileType
.
PDF
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment