示例#1
0
 public function download($snapshotId)
 {
     $snapshot = Snapshot::find($snapshotId);
     $filename = explode('/', $snapshot->webpage->url);
     $filename = array_pop($filename);
     header("Content-type:application/pdf");
     header("Content-Disposition:inline;filename='{$filename}'");
     header('Content-Transfer-Encoding: binary');
     header('Accept-Ranges: bytes');
     echo $snapshot->binary;
     exit;
 }