mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-19 01:46:03 +02:00
Handle icon & qrcode upload failure gracefully
This commit is contained in:
@@ -265,10 +265,12 @@
|
||||
let imgdata = new FormData();
|
||||
imgdata.append('icon', this.$refs.iconInput.files[0]);
|
||||
|
||||
const { data } = await this.form.upload('/api/v1/icons', imgdata)
|
||||
|
||||
this.tempIcon = data.filename;
|
||||
|
||||
this.form.upload('/api/v1/icons', imgdata, {returnError: true}).then(response => {
|
||||
this.tempIcon = response.data.filename;
|
||||
})
|
||||
.catch(error => {
|
||||
this.$notify({type: 'is-danger', text: this.$t(error.response.data.message) })
|
||||
});
|
||||
},
|
||||
|
||||
fetchLogo() {
|
||||
|
Reference in New Issue
Block a user