PLT-3270 Comment out max file size setting in system console (#3324)
* Comment out max file size settting in system console * Remove pending post after successful create post request
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b353b9fbcf
Коммит
974238231b
@@ -22,8 +22,8 @@ export default class StorageSettings extends AdminSettings {
|
|||||||
|
|
||||||
this.renderSettings = this.renderSettings.bind(this);
|
this.renderSettings = this.renderSettings.bind(this);
|
||||||
|
|
||||||
|
//maxFileSize: props.config.FileSettings.MaxFileSize,
|
||||||
this.state = Object.assign(this.state, {
|
this.state = Object.assign(this.state, {
|
||||||
maxFileSize: props.config.FileSettings.MaxFileSize,
|
|
||||||
driverName: props.config.FileSettings.DriverName,
|
driverName: props.config.FileSettings.DriverName,
|
||||||
directory: props.config.FileSettings.Directory,
|
directory: props.config.FileSettings.Directory,
|
||||||
amazonS3AccessKeyId: props.config.FileSettings.AmazonS3AccessKeyId,
|
amazonS3AccessKeyId: props.config.FileSettings.AmazonS3AccessKeyId,
|
||||||
@@ -34,7 +34,7 @@ export default class StorageSettings extends AdminSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getConfigFromState(config) {
|
getConfigFromState(config) {
|
||||||
config.FileSettings.MaxFileSize = this.parseInt(this.state.maxFileSize);
|
//config.FileSettings.MaxFileSize = this.parseInt(this.state.maxFileSize);
|
||||||
config.FileSettings.DriverName = this.state.driverName;
|
config.FileSettings.DriverName = this.state.driverName;
|
||||||
config.FileSettings.Directory = this.state.directory;
|
config.FileSettings.Directory = this.state.directory;
|
||||||
config.FileSettings.AmazonS3AccessKeyId = this.state.amazonS3AccessKeyId;
|
config.FileSettings.AmazonS3AccessKeyId = this.state.amazonS3AccessKeyId;
|
||||||
@@ -57,26 +57,27 @@ export default class StorageSettings extends AdminSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderSettings() {
|
renderSettings() {
|
||||||
|
/*<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}
|
||||||
|
/>*/
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SettingsGroup>
|
<SettingsGroup>
|
||||||
<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
|
<DropdownSetting
|
||||||
id='driverName'
|
id='driverName'
|
||||||
values={[
|
values={[
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ class CreatePost extends React.Component {
|
|||||||
|
|
||||||
Client.createPost(post,
|
Client.createPost(post,
|
||||||
() => {
|
() => {
|
||||||
// DO nothing. Websockets will handle this.
|
PostStore.removePendingPost(post.pending_post_id);
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
if (err.id === 'api.post.create_post.root_id.app_error') {
|
if (err.id === 'api.post.create_post.root_id.app_error') {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user