PLT-6924 Added ability to disable file uploads/downloads on old mobile apps (#7117)

Этот коммит содержится в:
Harrison Healey
2017-08-04 14:05:33 -04:00
коммит произвёл Christopher Speller
родитель 3998659236
Коммит fb2022fb1c
8 изменённых файлов: 176 добавлений и 97 удалений

Просмотреть файл

@@ -28,6 +28,7 @@ import TeamStore from 'stores/team_store.jsx';
import ConfirmModal from './confirm_modal.jsx';
import Constants from 'utils/constants.jsx';
import * as FileUtils from 'utils/file_utils';
import {FormattedHTMLMessage, FormattedMessage} from 'react-intl';
import {browserHistory} from 'react-router/es6';
@@ -710,7 +711,7 @@ export default class CreatePost extends React.Component {
}
let attachmentsDisabled = '';
if (global.window.mm_config.EnableFileAttachments === 'false') {
if (!FileUtils.canUploadFiles()) {
attachmentsDisabled = ' post-create--attachment-disabled';
}