Basically working upload progress bar.
This commit is contained in:
parent
a477c8be4c
commit
29b4f59982
4 changed files with 66 additions and 21 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue