Allow uploading the same file twice

pull/1/head
David Baker 2015-07-21 20:55:23 -07:00
parent 2eba2280d8
commit 904754b20d
1 changed files with 4 additions and 1 deletions

View File

@ -33,7 +33,10 @@ module.exports = React.createClass({
onUploadFileSelected: function(ev) {
var files = ev.target.files;
// MessageComposer shouldn't have to rely on it's parent passing in a callback to upload a file
this.props.uploadFile(files[0]);
if (files && files.length > 0) {
this.props.uploadFile(files[0]);
}
this.refs.uploadInput.getDOMNode().value = null;
},
render: function() {