Nisha Patel
Problem
I´m trying to upload an image with the filepond library. My problem it´s that the return 419 error
to build my component in Vue, I’m trying this code:
In my script, I have an example that it´s written in the documentation:
all import to create Filepond .....
I´m sending headers with token, but i don´t know if i can send this data so.
Solution
Seem like a problem with your csrf token
HTTP response status code 419 Page Expired is an unofficial client error that is Laravel-specific and returned by the server to indicate that the Cross-Site Request Forgery (CSRF) validation has failed. Source: >https://http.dev/419#:~:text=HTTP%20response%20status%20code%20419,(CSRF)%20validation%20has%20failed.
Change $('meta[name="csrf-token"]').attr('content') by document.querySelector('meta[name="csrf-token"]').content
Answered by: >Daniel Ballesteros
Credit: >StackOverflow
Blog links:
>How to show encrypted user id in URL in Laravel?
>How to fix Laravel LiveWire listener?