axios config

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-04-01 11:11:28 +02:00
committed by Julius Härtl
parent 2eca9c2d01
commit 6cab67cb11
2 changed files with 15 additions and 2 deletions

View File

@@ -39,7 +39,11 @@ export default {
bodyFormData.append('type', 'deck_file')
bodyFormData.append('file', file)
try {
await this.$store.dispatch('createAttachment', { cardId: this.cardId, formData: bodyFormData })
await this.$store.dispatch('createAttachment', { cardId: this.cardId,
formData: bodyFormData,
onUploadProgress: (e) => {
console.log(e)
} })
} catch (err) {
if (err.response.data.status === 409) {
this.overwriteAttachment = err.response.data.data