Add inline disposition for PDF previews

This commit is contained in:
David Bomba 2025-11-03 17:19:45 +11:00
parent f5f447a3ff
commit 2bf0326797
2 changed files with 3 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class InvoiceController extends Controller
$file = (new \App\Jobs\Entity\CreateRawPdf($invitation))->handle(); $file = (new \App\Jobs\Entity\CreateRawPdf($invitation))->handle();
$headers = ['Content-Type' => 'application/pdf']; $headers = ['Content-Type' => 'application/pdf', 'Content-Disposition' => 'inline'];
return response()->make($file, 200, $headers); return response()->make($file, 200, $headers);
} }

View File

@ -124,7 +124,8 @@ class PurchaseOrderController extends Controller
$file = $invitation->purchase_order->service()->getPurchaseOrderPdf(); $file = $invitation->purchase_order->service()->getPurchaseOrderPdf();
$headers = ['Content-Type' => 'application/pdf']; // $headers = ['Content-Type' => 'application/pdf'];
$headers = ['Content-Type' => 'application/pdf', 'Content-Disposition' => 'inline'];
return response()->make($file, 200, $headers); return response()->make($file, 200, $headers);