Be sure to validate the picture on the server. Vue, Laravel?
I have an example, I want to upload a picture to the server.
1) I validate the selected image on vue.
2) I encode it into a base64 string and send this code as text via ajax
Is it possible to validate only on vue or is it necessary on the server.
What are the ways to solve this?Laravel Anonymous, Mar 16, 2020
Everything should always be validated on the server.
Why don't you send the file itself to the server?
Do you definitely need to first encode it in base64 and send it as a string?Anonymous
In your case, you don't need to validate! In general, it is necessary.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!