When I am uploading a file above 5mb I get the following error,
The "" file does not exist or is not readable.
This only happens once file sizes creep up towards 5mb, I cannot understand why this would be a problem, below is my code,
public function verifySave(Request $request)
{
$path = Storage::disk('local')->put('verification', $request->file('certificate'));
//$path = $request->file('certificate')->putFileAs('verification');
$newPath = \Storage::disk('local')->path($path);
if(strpos($request->file('certificate')->getMimeType(), "image") !== false) {
$pdf = new Fpdf();
$pdf->AddPage();
$pdf->Image($newPath, 0, 0, -300);
$newPath = \Storage::disk('local')->path('verification/' . $request->file('certificate')->hashName() . '.pdf');
$pdf->Output('F', $newPath);
}
$verification = [
'death_certificate' => $newPath,
'uploaded' => 'Yes',
'method' => $request->input('verify_method')
];
$request->session()->put('verification', $verification);
return redirect('/your-details');
}
ini_set('upload_max_filesize', '500M')andini_set('post_max_size', '500M')