I am building a site where a user can upload pdf files, I use spatie/Medialibrary for this task and an hour ago everythngi was working great. However, I needed to install imagick for thumbnail generation of pdf files. After successfully installing it, file upload stopped working now I get This site can't be reached whenever I try to upload a file. Here's the line of code which my site breaks on (this is inside the FileController.uplaod function)
$filePdf->addMedia(storage_path('tmp/uploads/' . $file))->toMediaCollection('pdfFiles', 'local');
Model is setup correctly, storage is linked, as I said, it was working splendid before installation of imagick so everything is configured correctly. Here's the form setup from which uploaded file submit is called
<form id='SubmitForm' action='/uploadFile' method='post' enctype='multipart/form-data' autocomplete="off">
Here's the route setup
Route::post('/uploadFile', 'FileController@upload');
I need some help finding a solution for this because I have no idea where to even start. How can I even debug this sort of problem? Php version 7.1.26 Laravel version 5.5 medialibrary version 6.0 I have tried googling out this issue but with no success.