Skip to content

Commit

Permalink
Adding file size to browser download window (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevevg authored and barryvdh committed Feb 2, 2019
1 parent 9090955 commit 1056f54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PDF.php
Expand Up @@ -169,7 +169,8 @@ public function download($filename = 'document.pdf' ){
$output = $this->output();
return new Response($output, 200, array(
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="'.$filename.'"'
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
'Content-Length' => strlen($output),
));
}

Expand Down

0 comments on commit 1056f54

Please sign in to comment.