1 year ago

Laravel - POST 422 (Unprocessable Entity)

Posted 1 year ago by Rainieren

Hello, I have a small problem, I followed Jeffrey's tutorial on how to ajaxify the image upload system for a users profile, but I have an error on uploading a file. It for some reason says.

POST http://ict-hulp.dev/gebruikers/Rainieren/avatar 422 (Unprocessable Entity)

I don't know where this problem occurs but if I comment out this line of code in my avatarForm.vue:

axios.post(/gebruikers/${this.user.username}/avatar, data).then(() => flash('Foto bewerkt!'));

It does not give me an error at all. The route does exist. You can see it in this picture: https://imgur.com/a/f3uqv

Where can I look for the problem? This is a list of the files used in this problem:

AvatarForm.vue: https://pastebin.com/RUk11rb8

[email protected]: https://pastebin.com/NcjT1m4y

ImageUpload.vue: https://pastebin.com/vswYqgiU

Thanks in advance

Please sign in or create an account to participate in this conversation.