File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/files-and-videos/files-page Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';
4
4
import { FormattedMessage , useIntl } from '@edx/frontend-platform/i18n' ;
5
5
import { CheckboxFilter , Container } from '@openedx/paragon' ;
6
6
import Placeholder from '../../editors/Placeholder' ;
7
+ import { UPLOAD_FILE_MAX_SIZE } from '../../constants' ;
7
8
8
9
import { RequestStatus } from '../../data/constants' ;
9
10
import { useModels , useModel } from '../../generic/model-store' ;
@@ -90,7 +91,13 @@ const FilesPage = ({
90
91
usageErrorMessages : errorMessages . usageMetrics ,
91
92
fileType : 'file' ,
92
93
} ;
93
- const maxFileSize = 20 * 1048576 ;
94
+
95
+ // MaxFileSize used in Files upload page
96
+ // checks if OVERRIDE_UPLOAD_FILE_MAX_SIZE_IN_MB env variable exists and is a valid number, else uses default from constants
97
+ const overrideMaxFileSize = parseInt ( process . env . OVERRIDE_UPLOAD_FILE_MAX_SIZE_IN_MB , 10 ) ;
98
+ const maxFileSize = ! isNaN ( overrideMaxFileSize ) && overrideMaxFileSize > 0
99
+ ? overrideMaxFileSize * 1024 * 1024
100
+ : UPLOAD_FILE_MAX_SIZE ;
94
101
95
102
const activeColumn = {
96
103
id : 'activeStatus' ,
You can’t perform that action at this time.
0 commit comments