mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-05 22:25:36 +00:00
Basically working upload progress bar.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user