From 03eece597d491ed9069fc684a03a980d9250844a Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Wed, 23 Sep 2015 15:01:02 -0700
Subject: Added support to drag and drop text into the main textbox or RHS
 textbox

---
 web/react/components/file_upload.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(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 3cb284171..3dc4e5de2 100644
--- a/web/react/components/file_upload.jsx
+++ b/web/react/components/file_upload.jsx
@@ -110,7 +110,7 @@ export default class FileUpload extends React.Component {
         if (typeof files !== 'string' && files.length) {
             this.uploadFiles(files);
         } else {
-            this.props.onUploadError('Invalid file upload', -1);
+            this.props.onTextDrop(e.originalEvent.dataTransfer.getData('Text'));
         }
     }
 
@@ -266,6 +266,7 @@ FileUpload.propTypes = {
     getFileCount: React.PropTypes.func,
     onFileUpload: React.PropTypes.func,
     onUploadStart: React.PropTypes.func,
+    onTextDrop: React.PropTypes.func,
     channelId: React.PropTypes.string,
     postType: React.PropTypes.string
 };
-- 
cgit v1.2.3-1-g7c22

