/**
  * Sends the file.
  */
 public function sendContent()
 {
     if (!$this->isSuccessful()) {
         parent::sendContent();
         return;
     }
     if (0 === $this->maxlen) {
         return;
     }
     $out = fopen('php://output', 'wb');
     $file = $this->filesystem->readStream($this->file->getPath());
     stream_copy_to_stream($file, $out, $this->maxlen, $this->offset);
     fclose($out);
     fclose($file);
 }
示例#2
0
 /**
  * Sends content for the current web response.
  *
  * @return Response
  */
 public function sendContent()
 {
     return parent::sendContent();
 }