mercredi 26 décembre 2018

When attempting to upload a file in development on Laravel 5 I get stream_socket_sendto(): error

I am trying a simple upload from a file so that a country has a sound file for its anthem attached. I am using PHP 7.2.10 with Laravel 5.7.19.

My form includes a field named anthem and the form commences with

<form id="form-app" enctype="multipart/form-data"method="post" action="">

The route in web.php is:

Route::post('storeCountryAnthemMPOnly/{id}','CountryController@storeCountryAnthemMPOnly')->name('storeCountryAnthemMPOnly');

and my function in the controller is just:

public function storeCountryAnthemMPOnly(Request $request, $id)
    {
      dd($request);
    }

When I press the submit button I am getting:

stream_socket_sendto(): A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.

I cannot understand this and help is greatly appreciated.

Happy New Year!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire