From 131bae89fd3ea601b032c9650edb3693801c9467 Mon Sep 17 00:00:00 2001
From: blackle <isabelle@blackle-mori.com>
Date: Sun, 8 Jan 2017 21:00:13 -0500
Subject: Generate key for each input so we can upload the same file even after
 deleting

---
 .../components/features/compose/containers/upload_button_container.jsx   | 1 +
 1 file changed, 1 insertion(+)

(limited to 'app/assets/javascripts/components/features/compose/containers/upload_button_container.jsx')

diff --git a/app/assets/javascripts/components/features/compose/containers/upload_button_container.jsx b/app/assets/javascripts/components/features/compose/containers/upload_button_container.jsx
index 4154b0737..7afa7d355 100644
--- a/app/assets/javascripts/components/features/compose/containers/upload_button_container.jsx
+++ b/app/assets/javascripts/components/features/compose/containers/upload_button_container.jsx
@@ -4,6 +4,7 @@ import { uploadCompose } from '../../../actions/compose';
 
 const mapStateToProps = state => ({
   disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 3 || state.getIn(['compose', 'media_attachments']).some(m => m.get('type') === 'video')),
+  key: Math.floor((Math.random() * 0x10000))
 });
 
 const mapDispatchToProps = dispatch => ({
-- 
cgit 

