Guess the Content-Type or return the default application/octet-stream
string
Overrides EntityBodyInterface::getContentType
http://www.php.net/manual/en/function.finfo-open.php
public function getContentType() {
if (!($this
->isLocal() && $this
->getWrapper() == 'plainfile' && file_exists($this
->getUri()))) {
return 'application/octet-stream';
}
return Mimetypes::getInstance()
->fromFilename($this
->getUri()) ?: 'application/octet-stream';
}