Resolve Upload image rerender and double submit

- Make Upload component re-render on failed upload
- Resolve double submit of uploaded to the backend when uploading with drag and drop

Co-authored-by: @mattWr18
Co-authored-by: @tirrok
This commit is contained in:
aonomike 2019-05-29 16:09:34 +03:00
parent 7def0b4c20
commit 0111e60f1d

View File

@ -8,7 +8,6 @@
:include-styling="false"
:style="backgroundImage"
@vdropzone-thumbnail="thumbnail"
@vdropzone-drop="vddrop"
@vdropzone-error="verror"
/>
</div>
@ -28,7 +27,7 @@ export default {
return {
dropzoneOptions: {
url: this.vddrop,
maxFilesize: 3.0,
maxFilesize: 5.0,
previewTemplate: this.template(),
dictDefaultMessage: '',
},
@ -98,8 +97,8 @@ export default {
.catch(error => this.$toast.error(error.message))
},
verror(file, message) {
this.error = true
if (file.status === 'error') {
this.error = true
this.$toast.error(file.status, message)
}
},