diff options
author | Thomas Balthazar <tbalthazar@users.noreply.github.com> | 2016-05-24 15:07:42 +0200 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-24 09:07:42 -0400 |
commit | 7e2b539de484ac4f2e97eafce6b8d63ffa2caf13 (patch) | |
tree | e85b742e695c611958f249a4e39d0e6370c1f9b0 /webapp/components | |
parent | 8e5c31859012516afcfc28eddbb644a4c96fe9d3 (diff) | |
download | chat-7e2b539de484ac4f2e97eafce6b8d63ffa2caf13.tar.gz chat-7e2b539de484ac4f2e97eafce6b8d63ffa2caf13.tar.bz2 chat-7e2b539de484ac4f2e97eafce6b8d63ffa2caf13.zip |
Max_File_Size setting in System Console > File Settings (#3070)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/admin_console/storage_settings.jsx | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/webapp/components/admin_console/storage_settings.jsx b/webapp/components/admin_console/storage_settings.jsx index 339876b18..7cfa9cf3b 100644 --- a/webapp/components/admin_console/storage_settings.jsx +++ b/webapp/components/admin_console/storage_settings.jsx @@ -23,6 +23,7 @@ export default class StorageSettings extends AdminSettings { this.renderSettings = this.renderSettings.bind(this); this.state = Object.assign(this.state, { + maxFileSize: props.config.FileSettings.MaxFileSize, driverName: props.config.FileSettings.DriverName, directory: props.config.FileSettings.Directory, amazonS3AccessKeyId: props.config.FileSettings.AmazonS3AccessKeyId, @@ -33,6 +34,7 @@ export default class StorageSettings extends AdminSettings { } getConfigFromState(config) { + config.FileSettings.MaxFileSize = this.parseInt(this.state.maxFileSize); config.FileSettings.DriverName = this.state.driverName; config.FileSettings.Directory = this.state.directory; config.FileSettings.AmazonS3AccessKeyId = this.state.amazonS3AccessKeyId; @@ -64,6 +66,24 @@ export default class StorageSettings extends AdminSettings { /> } > + <TextSetting + id='maxFileSize' + label={ + <FormattedMessage + id='admin.image.maxFileSizeTitle' + defaultMessage='Max File Size:' + /> + } + placeholder={Utils.localizeMessage('admin.image.maxFileSizeExample', 'Ex "52428800"')} + helpText={ + <FormattedMessage + id='admin.image.maxFileSizeDescription' + defaultMessage='Max File Size in bytes. If blank, will be set to 52428800 (50MB).' + /> + } + value={this.state.maxFileSize} + onChange={this.handleChange} + /> <DropdownSetting id='driverName' values={[ @@ -177,4 +197,4 @@ export default class StorageSettings extends AdminSettings { </SettingsGroup> ); } -}
\ No newline at end of file +} |