Browse Source

Add content type header

Alan Lam 7 năm trước cách đây
mục cha
commit
aa6d7a0e5e
1 tập tin đã thay đổi với 1 bổ sung và 0 xóa
  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;
 }