Delete unneeded user avatar formData
This commit is contained in:
parent
10bd800297
commit
ab1a8d1045
1 changed files with 3 additions and 1 deletions
|
@ -49,13 +49,15 @@ export default class Profile {
|
|||
|
||||
saveForm() {
|
||||
const self = this;
|
||||
const formData = new FormData(this.form[0]);
|
||||
const formData = new FormData(this.form.get(0));
|
||||
const avatarBlob = this.avatarGlCrop.getBlob();
|
||||
|
||||
if (avatarBlob != null) {
|
||||
formData.append('user[avatar]', avatarBlob, 'avatar.png');
|
||||
}
|
||||
|
||||
formData.delete('user[avatar]-trigger');
|
||||
|
||||
axios({
|
||||
method: this.form.attr('method'),
|
||||
url: this.form.attr('action'),
|
||||
|
|
Loading…
Reference in a new issue