Reponse type

This commit is contained in:
David Bomba 2021-07-25 22:44:29 +10:00
parent 8cf9576496
commit 438180daca

View File

@ -240,8 +240,12 @@ class PreviewController extends BaseController
//else
$file_path = PreviewPdf::dispatchNow($maker->getCompiledHTML(true), auth()->user()->company());
return response()->download($file_path, basename($file_path), ['Cache-Control:' => 'no-cache'])->deleteFileAfterSend(true);
//return response()->download($file_path, basename($file_path), ['Cache-Control:' => 'no-cache'])->deleteFileAfterSend(true);
$response = Response::make($file_path, 200);
$response->header('Content-Type', 'application/pdf');
return $response;
}