File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/textbooks/textbook-form Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import { getUploadFileMaxSize } from '@src/constants';
25
25
import textbookFormValidationSchema from './validations' ;
26
26
import messages from './messages' ;
27
27
28
+ const UPLOAD_FILE_MAX_SIZE = getUploadFileMaxSize ( ) ;
28
29
const TextbookForm = ( {
29
30
closeTextbookForm,
30
31
initialFormValues,
@@ -171,7 +172,7 @@ const TextbookForm = ({
171
172
onSavingStatus = { onSavingStatus }
172
173
invalidFileSizeMore = { intl . formatMessage (
173
174
messages . uploadModalFileInvalidSizeText ,
174
- { maxSize : getUploadFileMaxSize ( ) / ( 1000 * 1000 ) } ,
175
+ { maxSize : UPLOAD_FILE_MAX_SIZE / ( 1024 * 1024 ) } ,
175
176
) }
176
177
onSelectFile = { setSelectedFile }
177
178
previewComponent = { (
@@ -180,7 +181,7 @@ const TextbookForm = ({
180
181
< span className = "modal-preview-text" > { selectedFile } </ span >
181
182
</ div >
182
183
) }
183
- maxSize = { getUploadFileMaxSize ( ) }
184
+ maxSize = { UPLOAD_FILE_MAX_SIZE }
184
185
/>
185
186
< PromptIfDirty dirty = { dirty } />
186
187
</ >
You can’t perform that action at this time.
0 commit comments