src/Viserio/Component/Http/Response/BinaryFileResponse.php
protected function setAutoEtag(): void
    {
        $eTag = \base64_encode(\hash_file('sha256', $this->file->getPathname(), true));

        if (\strpos($eTag, '"') !== 0) {
            $eTag = '"' . $eTag . '"';
        }

        $this->headers['Etag']     = [$eTag];
        $this->headerNames['etag'] = 'Etag';
    }
protected function setAutoEtag(): void
    {
        $eTag = \base64_encode(\hash_file('sha256', $this->file->getPathname(), true));

        if (\strpos($eTag, '"') !== 0) {
            $eTag = '"' . $eTag . '"';
        }

        $this->headers['Etag']     = [$eTag];
        $this->headerNames['etag'] = 'Etag';
    }
Automatically sets the ETag header according to the checksum of the file.

@return void