summaryrefslogtreecommitdiffstats
path: root/webapp/components/user_settings/user_settings_general.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/user_settings/user_settings_general.jsx')
-rw-r--r--webapp/components/user_settings/user_settings_general.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index 37264fb7e..f8910b9bc 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -95,6 +95,7 @@ class UserSettingsGeneralTab extends React.Component {
this.updateSection = this.updateSection.bind(this);
this.state = this.setupInitialState(props);
+ this.setState({maxFileSize: global.window.mm_config.MaxFileSize});
}
submitUsername(e) {
e.preventDefault();
@@ -221,7 +222,7 @@ class UserSettingsGeneralTab extends React.Component {
if (picture.type !== 'image/jpeg' && picture.type !== 'image/png') {
this.setState({clientError: formatMessage(holders.validImage)});
return;
- } else if (picture.size > Constants.MAX_FILE_SIZE) {
+ } else if (picture.size > this.state.maxFileSize) {
this.setState({clientError: formatMessage(holders.imageTooLarge)});
return;
}