Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
422f11f1
Commit
422f11f1
authored
Oct 24, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(common): 文件上传处理
parent
7115dad1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
CommonController.java
...va/com/dlbridge/jadp/plugins/common/CommonController.java
+2
-2
No files found.
src/main/java/com/dlbridge/jadp/plugins/common/CommonController.java
View file @
422f11f1
...
@@ -127,9 +127,9 @@ public class CommonController {
...
@@ -127,9 +127,9 @@ public class CommonController {
public
Result
<?>
uploadClaimer
(
@RequestPart
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"gCmptId"
)
Integer
gCmptId
)
{
public
Result
<?>
uploadClaimer
(
@RequestPart
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"gCmptId"
)
Integer
gCmptId
)
{
try
{
try
{
// 检查文件大小是否超过1MB
// 检查文件大小是否超过1MB
long
maxFileSize
=
1024
*
1024
;
// 1MB
long
maxFileSize
=
5
*
1024
*
1024
;
// 1MB
if
(
file
.
getSize
()
>
maxFileSize
)
{
if
(
file
.
getSize
()
>
maxFileSize
)
{
return
Result
.
fail
().
setMsg
(
"上传文件大小不能超过
1
MB"
);
return
Result
.
fail
().
setMsg
(
"上传文件大小不能超过
5
MB"
);
}
}
String
originalFilename
=
file
.
getOriginalFilename
();
String
originalFilename
=
file
.
getOriginalFilename
();
...
...
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