File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/generic/modal-dropzone Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { FileUpload as FileUploadIcon } from '@openedx/paragon/icons';
16
16
import useModalDropzone from './useModalDropzone' ;
17
17
import messages from './messages' ;
18
18
import { getUploadFileMaxSize } from '@src/constants' ;
19
+ const UPLOAD_FILE_MAX_SIZE = getUploadFileMaxSize ( ) ;
19
20
20
21
const ModalDropzone = ( {
21
22
fileTypes,
@@ -30,7 +31,7 @@ const ModalDropzone = ({
30
31
onChange,
31
32
onSavingStatus,
32
33
onSelectFile,
33
- maxSize = getUploadFileMaxSize ( ) ,
34
+ maxSize = UPLOAD_FILE_MAX_SIZE ,
34
35
} ) => {
35
36
const {
36
37
intl,
@@ -48,7 +49,7 @@ const ModalDropzone = ({
48
49
49
50
const invalidSizeMore = invalidFileSizeMore || intl . formatMessage (
50
51
messages . uploadImageDropzoneInvalidSizeMore ,
51
- { maxSize : maxSize / ( 1000 * 1000 ) } ,
52
+ { maxSize : maxSize / ( 1024 * 1024 ) } ,
52
53
) ;
53
54
54
55
const inputComponent = previewUrl ? (
@@ -129,7 +130,7 @@ ModalDropzone.defaultProps = {
129
130
imageHelpText : '' ,
130
131
previewComponent : null ,
131
132
imageDropzoneText : '' ,
132
- maxSize : getUploadFileMaxSize ( ) ,
133
+ maxSize : UPLOAD_FILE_MAX_SIZE ,
133
134
invalidFileSizeMore : '' ,
134
135
onSelectFile : null ,
135
136
} ;
You can’t perform that action at this time.
0 commit comments