Generate key for each input so we can upload the same file even after deleting
This commit is contained in:
parent
2e71bb031b
commit
131bae89fd
2 changed files with 4 additions and 2 deletions
|
@ -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 => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue