Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
file-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
back-end
file-service
Commits
89590c6c
Commit
89590c6c
authored
May 22, 2020
by
huangcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加word文件下载支持
parent
886640a6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
FileTypeEnum.java
...ava/com/esv/freight/file/module/file/em/FileTypeEnum.java
+2
-0
DeleteControllerTest.java
...ght/file/module/file/controller/DeleteControllerTest.java
+1
-1
No files found.
src/main/java/com/esv/freight/file/module/file/em/FileTypeEnum.java
View file @
89590c6c
...
@@ -14,9 +14,11 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -14,9 +14,11 @@ import org.apache.commons.lang3.StringUtils;
public
enum
FileTypeEnum
{
public
enum
FileTypeEnum
{
UNDEFINED
(
"undefined"
,
"text/plain"
),
UNDEFINED
(
"undefined"
,
"text/plain"
),
TXT
(
"txt"
,
"text/plain"
),
IMAGE
(
"image"
,
"application/x-jpg"
),
IMAGE
(
"image"
,
"application/x-jpg"
),
PDF
(
"pdf"
,
"application/pdf"
),
PDF
(
"pdf"
,
"application/pdf"
),
EXCEL
(
"excel"
,
"application/vnd.ms-excel"
),
EXCEL
(
"excel"
,
"application/vnd.ms-excel"
),
WORD
(
"word"
,
"application/application/msword"
),
APK
(
"apk"
,
"application/vnd.android.package-archive"
);
APK
(
"apk"
,
"application/vnd.android.package-archive"
);
private
String
fileType
;
private
String
fileType
;
...
...
src/test/java/com/esv/freight/file/module/file/controller/DeleteControllerTest.java
View file @
89590c6c
...
@@ -38,7 +38,7 @@ public class DeleteControllerTest extends BaseTestController {
...
@@ -38,7 +38,7 @@ public class DeleteControllerTest extends BaseTestController {
String
url
=
"/delete/single"
;
String
url
=
"/delete/single"
;
FileForm
form
=
new
FileForm
();
FileForm
form
=
new
FileForm
();
form
.
setId
(
"5ec
6469a29c8560d78274b4b
"
);
form
.
setId
(
"5ec
72b8d29c85620fcd68a03
"
);
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
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