/**
  * Sends the file.
  */
 public function sendContent()
 {
     if (!$this->isSuccessful()) {
         parent::sendContent();
         return;
     }
     if (0 === $this->maxlen) {
         return;
     }
     $out = fopen('php://output', 'wb');
     $in = $this->ioService->getFileInputStream($this->file);
     stream_copy_to_stream($in, $out, $this->maxlen, $this->offset);
     fclose($out);
 }
Exemplo n.º 2
0
 public function getFileInputStream(BinaryFile $binaryFile)
 {
     return $this->publishedIOService->getFileInputStream($binaryFile);
 }