allow the same file to be attached, bug in login
This commit is contained in:
+9
-3
@@ -1135,6 +1135,8 @@
|
|||||||
function(err) {
|
function(err) {
|
||||||
this.props.onError(err, "err");
|
this.props.onError(err, "err");
|
||||||
});
|
});
|
||||||
|
// Clear the value so the same file can be uploaded again.
|
||||||
|
e.target.value = '';
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
@@ -3337,6 +3339,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Clear the value so the same file can be uploaded again.
|
||||||
|
e.target.value = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
handleAttachFile: function(e) {
|
handleAttachFile: function(e) {
|
||||||
@@ -3355,6 +3359,8 @@
|
|||||||
}, false);
|
}, false);
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
}
|
}
|
||||||
|
// Clear the value so the same file can be uploaded again.
|
||||||
|
e.target.value = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSend: function() {
|
handleSend: function() {
|
||||||
@@ -3605,11 +3611,11 @@
|
|||||||
var promise = null;
|
var promise = null;
|
||||||
var token = Tinode.getLoginToken();
|
var token = Tinode.getLoginToken();
|
||||||
|
|
||||||
if (token) {
|
if (login && password) {
|
||||||
promise = Tinode.loginToken(token.token, cred);
|
|
||||||
} else if (password) {
|
|
||||||
this.setState({password: null});
|
this.setState({password: null});
|
||||||
promise = Tinode.loginBasic(login, password, cred);
|
promise = Tinode.loginBasic(login, password, cred);
|
||||||
|
} else if (token) {
|
||||||
|
promise = Tinode.loginToken(token.token, cred);
|
||||||
} else {
|
} else {
|
||||||
this.setState({loginDisabled: false});
|
this.setState({loginDisabled: false});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user