I've created a file upload method and the file uploading with the file extension like jpg, png
etc are successful. However, when I upload a zip file, it says me "Undefined variable: e
". To find, I did dd()
at the beginning of the respective method but it still says the above error. My route is as below:
Route::post('media/savedata/{id?}/{page?}', 'Administrator\MedialibraryController@savedata');
The method is as below:
public function savedata($id, $page, Request $request) {
...
}
The content of the "network" tab is as below:
Request URL: http://localhost/stmd/administrator/media/savedata/0/1
Request Method: POST
Status Code: 500 Internal Server Error
Remote Address: [::1]:80
Referrer Policy: no-referrer-when-downgrade
------WebKitFormBoundaryaHtERzAAThbQB4ae
Content-Disposition: form-data; name="_token"
TXLvBGRXrdjpQbhAjm18MTxkiHamauvcjhKBhl6n
------WebKitFormBoundaryaHtERzAAThbQB4ae
Content-Disposition: form-data; name="fileType"
I
------WebKitFormBoundaryaHtERzAAThbQB4ae
Content-Disposition: form-data; name="fileName"; filename="gradle-3.5-bin.zip"
Content-Type: application/zip
My intention is: If zip file is upload then it will redirect to another page however, I can't do this because even dd()
is not working.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire