Basically working upload progress bar.

This commit is contained in:
David Baker 2015-07-19 22:02:04 -04:00
parent a477c8be4c
commit 29b4f59982
4 changed files with 66 additions and 21 deletions

View file

@ -32,14 +32,8 @@ module.exports = React.createClass({
onUploadFileSelected: function(ev) {
var files = ev.target.files;
ContentMessages.sendContentToRoom(
files[0], this.props.room.roomId, MatrixClientPeg.get()
).progress(function(ev) {
//console.log("Upload: "+ev.loaded+" / "+ev.total);
}).done(undefined, function() {
// display error message
});
// MessageComposer shouldn't have to rely on it's parent passing in a callback to upload a file
this.props.uploadFile(files[0]);
},
render: function() {