File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,15 @@ export const DECODED_ROUTES = {
52
52
] ,
53
53
} ;
54
54
55
- export const UPLOAD_FILE_MAX_SIZE = 20 * 1024 * 1024 ; // 20mb
55
+ // FilesUpload page - Default max size: 20MB else use env override if exists and valid number
56
+ const DEFAULT_UPLOAD_FILE_MAX_SIZE = 20 * 1024 * 1024 ;
57
+ const overrideMaxFileSizeMB = parseInt ( process . env . OVERRIDE_UPLOAD_FILE_MAX_SIZE_IN_MB , 10 ) ;
58
+ const computedUploadFileMaxSize = (
59
+ ! isNaN ( overrideMaxFileSizeMB ) && overrideMaxFileSizeMB > 0
60
+ ? overrideMaxFileSizeMB * 1024 * 1024
61
+ : DEFAULT_UPLOAD_FILE_MAX_SIZE
62
+ ) ;
63
+ export const UPLOAD_FILE_MAX_SIZE = computedUploadFileMaxSize ;
56
64
57
65
export const COURSE_BLOCK_NAMES = ( {
58
66
chapter : { id : 'chapter' , name : 'Section' } ,
You can’t perform that action at this time.
0 commit comments