I've custom vuex store action to send data to API server:
updateAvatar({commit, dispatch}, data) {
return this.$axios.put(`/users/${this.$auth.user.id}/logo`, data)
}
Here is I sent request to server:
let data = new FormData()
let blob = this.$toBlob(imgDataUrl)
data.set('key', 'value')
data.append('avatar', blob, 'avatar.png')
this.$store.dispatch('user/updateAvatar', data)
But when I check request on API server then request no has any fields.
How I can send correctly request with fields and file?