From cc453a048d50e57802bab9363b59c2189143b784 Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaad@spinpunch.com>
Date: Tue, 8 Mar 2016 15:07:43 +0500
Subject: Multiple UI Improvements

---
 web/react/components/file_upload.jsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'web/react/components/file_upload.jsx')

diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx
index cb8ede51b..f8965e13e 100644
--- a/web/react/components/file_upload.jsx
+++ b/web/react/components/file_upload.jsx
@@ -108,12 +108,12 @@ class FileUpload extends React.Component {
         }
     }
 
-    handleChange() {
-        var element = $(ReactDOM.findDOMNode(this.refs.fileInput));
+    handleChange(e) {
+        if (e.target.files.length > 0) {
+            this.uploadFiles(e.target.files);
 
-        this.uploadFiles(element.prop('files'));
-
-        Utils.clearFileInput(element[0]);
+            Utils.clearFileInput(e.target);
+        }
     }
 
     handleDrop(e) {
-- 
cgit v1.2.3-1-g7c22

