Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-Connect-Pre-Clearance
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
tao.mo
2025-01-16 16:51:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fb74c43210474590bd3a9dfcb055baa6fc505d20
fb74c432
1 parent
15af457d
biz-customer | 修改 |
最大文件大小验证调整 mt 2025年1月16日16:51:41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/constants/CustomerConstant.java
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/AttachmentValidate.java
server/biz-customer/src/main/java/com/fedex/connect/customer/constants/CustomerConstant.java
View file @
fb74c43
...
...
@@ -14,8 +14,9 @@ public interface CustomerConstant {
interface
VALIDATE_KEYS
{
//最大上传文件个数100个
Integer
UPLOAD_FILE_MAX_TOTAL
=
100
;
//最大上传总文件大小95M
Integer
UPLOAD_FILE_MAX_SIZE
=
95
*
1024
*
1024
;
//文件大小95M
Integer
FILE_MAX_SIZE
=
95
;
//最大上传总文件大小95kb
Integer
UPLOAD_FILE_MAX_SIZE
=
FILE_MAX_SIZE
*
1024
*
1024
;
}
}
}
\ No newline at end of file
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/AttachmentValidate.java
View file @
fb74c43
...
...
@@ -54,7 +54,7 @@ public class AttachmentValidate {
.
mapToLong
(
f
->
Optional
.
ofNullable
(
f
).
orElse
(
0L
)).
sum
();
//最大上传总文件大小超过95M
if
(
totalSize
>
CustomerConstant
.
VALIDATE_KEYS
.
UPLOAD_FILE_MAX_SIZE
){
responseUtils
.
fail
(
ResponseCode
.
MESSAGE_CODE_30008
,
CustomerConstant
.
VALIDATE_KEYS
.
UPLOAD_
FILE_MAX_SIZE
);
responseUtils
.
fail
(
ResponseCode
.
MESSAGE_CODE_30008
,
CustomerConstant
.
VALIDATE_KEYS
.
FILE_MAX_SIZE
);
}
}
...
...
Please
register
or
login
to post a comment