https://medium.com/@jagadeshanh/image-upload-and-validation-using-laravel-and-vuejs-e71e0f094fbb
It is better to save as files on the server
I am developing an app with Laravel and VueJS. The Laravel backend only returns JSON. VueJS uses axios to get, post, delete etc.
I have a model "Cat" which has 29 attributes. One of them is a photo of them. I don't know how big the images will be.
Now I am plan to implement a photo upload. I have a create form which creates new Cat objects in the system.
I am not sure what is the best way to realize it. I was thinking to base64 encode the image and post it the the server withing the other data. Then is the question: how to save it? In the database as blob, or on the server as a file? Another idea is to create a post request that simply saves the image. Then I must make sure to add the right data so the backend identifies it as a file.
Do you have any suggestions?
https://medium.com/@jagadeshanh/image-upload-and-validation-using-laravel-and-vuejs-e71e0f094fbb
It is better to save as files on the server
Please or to participate in this conversation.