MediaUpload: Correctly handle multiple uploads.

This commit is contained in:
lain 2020-06-08 18:22:17 +02:00
parent e6a27bcaca
commit e45f7fe877
3 changed files with 23 additions and 13 deletions

View file

@ -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

View file

@ -172,6 +172,7 @@
@uploading="disableSubmit"
@uploaded="addMediaFile"
@upload-failed="uploadFailed"
@all-uploaded="enableSubmit"
/>
<div
class="emoji-icon"