From 0eeaac88b46e4cae5dee1bcb44425c9f0b7f5457 Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Sun, 3 Apr 2016 01:26:50 +0530 Subject: [PATCH] Allow multiple files to be uploaded at once fixes vector-im/vector-web#219 --- src/components/views/rooms/MessageComposer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 7d5ce473d6..469356e7f4 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -48,8 +48,10 @@ module.exports = React.createClass({ onUploadFileSelected: function(ev) { var files = ev.target.files; // MessageComposer shouldn't have to rely on its parent passing in a callback to upload a file - if (files && files.length > 0) { - this.props.uploadFile(files[0]); + if (files) { + for(var i=0; i );