Generate key for each input so we can upload the same file even after deleting

This commit is contained in:
blackle 2017-01-08 21:00:13 -05:00
parent 2e71bb031b
commit 131bae89fd
2 changed files with 4 additions and 2 deletions

View file

@ -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 => ({