Skip to content
Advertisement

Lravel 5.4 Update method and uploading files

I would like in the method update() to upload files to the server.

upload method:

JavaScript

update method:

JavaScript

However, when I send the form error occurs.

enter image description here

But the same code with the upload () method store works very well.

JavaScript

Advertisement

Answer

I’ve just got this issue and fixed it using Input::all instead of $request object, something like:

JavaScript

It seems like there is any issue with the request helper/class and the UploadedFile when you make PUT instead of pure POST

Cheers!!…

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement