function File::getDownloadHeaders
Overrides FileInterface::getDownloadHeaders
File
-
core/
modules/ file/ src/ Entity/ File.php, line 306
Class
- File
- Defines the file entity class.
Namespace
Drupal\file\EntityCode
public function getDownloadHeaders() : array {
return [
'Content-Type' => $this->getMimeType(),
'Content-Length' => $this->getSize(),
'Cache-Control' => 'private',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.