[Vuejs]-Upload image file not working in Laravel vuejs

0👍

I’d start with installing Telescope and checking the request

0👍

Uploaded files are treated differently by the server than other form data. When a file is uploaded via a form, it is sent as a binary stream, not as a string, and it requires special handling to be processed properly. The $request->file() method takes care of this handling for you, whereas the $request->get() or $request->all() method does not. by updating your controller code like this you should be able to see the uploaded file and store it:

public function updatemain(Request $request)
{
    $file = $request->file('file');
    // dd($file);
    $file->store('public/src/');
}

Leave a comment