file_get_content_headers

function file_get_content_headers

file_get_content_headers(FileInterface $file)

Examines a file entity and returns appropriate content headers for download.

Parameters

\Drupal\file\FileInterface $file: A file entity.

Return value

array An associative array of headers, as expected by \Symfony\Component\HttpFoundation\StreamedResponse.

File

core/modules/fil