Skip to content

Commit ad1bd86

Browse files
authored
fix: use new getUploadFileMaxSize function added to constants
Originally the constant 'maxFileSize' was hardcoded to 20MB and was not configured to use the pre-existing value defined in constants.js This fix removes the hardcoded value and calls the function getUploadFileMaxSize() to determine the value of maxFileSize
1 parent 2250044 commit ad1bd86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/files-and-videos/files-page/FilesPage.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
33
import { useDispatch, useSelector } from 'react-redux';
44
import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
55
import { CheckboxFilter, Container } from '@openedx/paragon';
6+
import { getUploadFileMaxSize } from '@src/constants';
67
import Placeholder from '../../editors/Placeholder';
78

89
import { RequestStatus } from '../../data/constants';
@@ -90,7 +91,7 @@ const FilesPage = ({
9091
usageErrorMessages: errorMessages.usageMetrics,
9192
fileType: 'file',
9293
};
93-
const maxFileSize = 20 * 1048576;
94+
const maxFileSize = getUploadFileMaxSize();
9495

9596
const activeColumn = {
9697
id: 'activeStatus',

0 commit comments

Comments
 (0)