Explorar o código

Add content type header

Alan Lam %!s(int64=7) %!d(string=hai) anos
pai
achega
aa6d7a0e5e
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      controllers/test_invoice.php

+ 1 - 0
controllers/test_invoice.php

@@ -42,6 +42,7 @@ $directory = $test->getDirectory();
 $pdf_filepath = $directory . "/tester_invoice.pdf";
 if($test->hasTesterInvoicePDF()) {
 	http::setDownloadHeaders($download_filename);
+	header("Content-Type: application/pdf");
 	readfile($pdf_filepath);
 	exit;
 }