Fixed issue with uploading files from RHS when trying to upload after opening the RHS and then switching channels
Этот коммит содержится в:
@@ -14,7 +14,7 @@ module.exports = React.createClass({
|
|||||||
var element = $(this.refs.fileInput.getDOMNode());
|
var element = $(this.refs.fileInput.getDOMNode());
|
||||||
var files = element.prop('files');
|
var files = element.prop('files');
|
||||||
|
|
||||||
var channelId = ChannelStore.getCurrentId();
|
var channelId = this.props.channelId || ChannelStore.getCurrentId();
|
||||||
|
|
||||||
this.props.onUploadError(null);
|
this.props.onUploadError(null);
|
||||||
|
|
||||||
@@ -192,14 +192,13 @@ module.exports = React.createClass({
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var channelId = ChannelStore.getCurrentId();
|
var channelId = this.props.channelId || ChannelStore.getCurrentId();
|
||||||
|
|
||||||
// generate a unique id that can be used by other components to refer back to this file upload
|
// generate a unique id that can be used by other components to refer back to this file upload
|
||||||
var clientId = utils.generateId();
|
var clientId = utils.generateId();
|
||||||
|
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
formData.append('channel_id', channelId);
|
formData.append('channel_id', channelId);
|
||||||
|
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
var hour;
|
var hour;
|
||||||
if (d.getHours() < 10) {
|
if (d.getHours() < 10) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user