File tree Expand file tree Collapse file tree 6 files changed +20
-20
lines changed Expand file tree Collapse file tree 6 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,9 @@ const EvidenceForm = ({
81
81
}
82
82
83
83
const beforeFileUpload = useCallback ( file => {
84
- const isLt10M = file . size / 1024 / 1024 < 15
85
- if ( ! isLt10M ) message . error ( 'File must smaller than 15MB .' )
86
- return isLt10M
84
+ const isLt4M = file . size / 1024 / 1024 < 4
85
+ if ( ! isLt4M ) message . error ( 'File must be smaller than 4MB .' )
86
+ return isLt4M
87
87
} , [ ] )
88
88
89
89
return (
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ const InputSelector: React.FC<InputSelectorProps> = p => {
91
91
}
92
92
93
93
if ( file . size / 1024 / 1024 > ( p . maxFileSizeMb || 2 ) ) {
94
- message . error ( `Image must smaller than ${ p . maxFileSizeMb || 2 } MB.` )
94
+ message . error ( `Image must be smaller than ${ p . maxFileSizeMb || 2 } MB.` )
95
95
return false
96
96
}
97
97
@@ -112,8 +112,8 @@ const InputSelector: React.FC<InputSelectorProps> = p => {
112
112
return false
113
113
}
114
114
115
- if ( file . size / 1024 / 1024 > ( p . maxFileSizeMb || 10 ) ) {
116
- message . error ( `File must smaller than ${ p . maxFileSizeMb || 10 } MB.` )
115
+ if ( file . size / 1024 / 1024 > ( p . maxFileSizeMb || 4 ) ) {
116
+ message . error ( `File must be smaller than ${ p . maxFileSizeMb || 4 } MB.` )
117
117
return false
118
118
}
119
119
Original file line number Diff line number Diff line change @@ -126,10 +126,10 @@ const RelTCRParams = ({
126
126
const isPDF = file . type === 'application/pdf'
127
127
if ( ! isPDF ) message . error ( 'Please upload file as PDF.' )
128
128
129
- const isLt10M = file . size / 1024 / 1024 < 10
130
- if ( ! isLt10M ) message . error ( 'File must smaller than 10MB .' )
129
+ const isLt4M = file . size / 1024 / 1024 < 4
130
+ if ( ! isLt4M ) message . error ( 'File must be smaller than 4MB .' )
131
131
132
- return isPDF && isLt10M
132
+ return isPDF && isLt4M
133
133
} , [ ] )
134
134
135
135
const onChangeDepositVal = useCallback (
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ const TCRParams = ({
135
135
if ( ! isSupportedImage ) message . error ( 'Please use PNG, jpeg, webp or SVG.' )
136
136
137
137
const isLt2M = file . size / 1024 / 1024 < 2
138
- if ( ! isLt2M ) message . error ( 'Image must smaller than 2MB.' )
138
+ if ( ! isLt2M ) message . error ( 'Image must be smaller than 2MB.' )
139
139
140
140
return isSupportedImage && isLt2M
141
141
} , [ ] )
@@ -144,10 +144,10 @@ const TCRParams = ({
144
144
const isPDF = file . type === 'application/pdf'
145
145
if ( ! isPDF ) message . error ( 'Please upload file as PDF.' )
146
146
147
- const isLt10M = file . size / 1024 / 1024 < 10
148
- if ( ! isLt10M ) message . error ( 'File must smaller than 10MB .' )
147
+ const isLt4M = file . size / 1024 / 1024 < 4
148
+ if ( ! isLt4M ) message . error ( 'File must be smaller than 4MB .' )
149
149
150
- return isPDF && isLt10M
150
+ return isPDF && isLt4M
151
151
} , [ ] )
152
152
153
153
const customRequest = useCallback (
Original file line number Diff line number Diff line change @@ -126,10 +126,10 @@ const RelTCRParams = ({
126
126
const isPDF = file . type === 'application/pdf'
127
127
if ( ! isPDF ) message . error ( 'Please upload file as PDF.' )
128
128
129
- const isLt10M = file . size / 1024 / 1024 < 10
130
- if ( ! isLt10M ) message . error ( 'File must smaller than 10MB .' )
129
+ const isLt4M = file . size / 1024 / 1024 < 4
130
+ if ( ! isLt4M ) message . error ( 'File must be smaller than 4MB .' )
131
131
132
- return isPDF && isLt10M
132
+ return isPDF && isLt4M
133
133
} , [ ] )
134
134
135
135
const onChangeDepositVal = useCallback (
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ const TCRParams = ({
192
192
if ( ! isSupportedImage ) message . error ( 'Please use PNG, webp, jpeg or SVG.' )
193
193
194
194
const isLt2M = file . size / 1024 / 1024 < 2
195
- if ( ! isLt2M ) message . error ( 'Image must smaller than 2MB.' )
195
+ if ( ! isLt2M ) message . error ( 'Image must be smaller than 2MB.' )
196
196
197
197
return isSupportedImage && isLt2M
198
198
} , [ ] )
@@ -201,10 +201,10 @@ const TCRParams = ({
201
201
const isPDF = file . type === 'application/pdf'
202
202
if ( ! isPDF ) message . error ( 'Please upload file as PDF.' )
203
203
204
- const isLt10M = file . size / 1024 / 1024 < 10
205
- if ( ! isLt10M ) message . error ( 'File must smaller than 10MB .' )
204
+ const isLt4M = file . size / 1024 / 1024 < 4
205
+ if ( ! isLt4M ) message . error ( 'File must be smaller than 4MB .' )
206
206
207
- return isPDF && isLt10M
207
+ return isPDF && isLt4M
208
208
} , [ ] )
209
209
210
210
const customRequest = useCallback (
You can’t perform that action at this time.
0 commit comments