MediaUpload: Correctly handle multiple uploads.
This commit is contained in:
parent
e6a27bcaca
commit
e45f7fe877
3 changed files with 23 additions and 13 deletions
|
@ -218,7 +218,6 @@ const PostStatusForm = {
|
|||
},
|
||||
addMediaFile (fileInfo) {
|
||||
this.newStatus.files.push(fileInfo)
|
||||
this.enableSubmit()
|
||||
},
|
||||
removeMediaFile (fileInfo) {
|
||||
let index = this.newStatus.files.indexOf(fileInfo)
|
||||
|
@ -227,7 +226,6 @@ const PostStatusForm = {
|
|||
uploadFailed (errString, templateArgs) {
|
||||
templateArgs = templateArgs || {}
|
||||
this.error = this.$t('upload.error.base') + ' ' + this.$t('upload.error.' + errString, templateArgs)
|
||||
this.enableSubmit()
|
||||
},
|
||||
disableSubmit () {
|
||||
this.submitDisabled = true
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
@uploading="disableSubmit"
|
||||
@uploaded="addMediaFile"
|
||||
@upload-failed="uploadFailed"
|
||||
@all-uploaded="enableSubmit"
|
||||
/>
|
||||
<div
|
||||
class="emoji-icon"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue