src/Viserio/Component/Http/Response/BinaryFileResponse.php
public function getBody(): StreamInterface
    {
        $fileStream = new Stream(\fopen($this->file->getPathname(), 'rb'));
        $outStream  = new Stream(\fopen('php://output', 'wb'));

        Util::copyToStream($fileStream, $outStream);

        $fileStream->close();

        if ($this->deleteFileAfterSend) {
            \unlink($this->file->getPathname());
        }

        return $outStream;
    }
public function getBody(): StreamInterface
    {
        $fileStream = new Stream(\fopen($this->file->getPathname(), 'rb'));
        $outStream  = new Stream(\fopen('php://output', 'wb'));

        Util::copyToStream($fileStream, $outStream);

        $fileStream->close();

        if ($this->deleteFileAfterSend) {
            \unlink($this->file->getPathname());
        }

        return $outStream;
    }
{@inheritdoc}