/** * @return string The MIME type of the file. */ public function getMimeType() { if ($this->realFile === null) { throw new EyeUnsupportedOperationException(__METHOD__ . ' on ' . $this->path); } return $this->realFile->getMimeType(); }
/** * @param IFile */ public function actionFile(IFile $file) { $this->sendResponse(new \Nette\Application\Responses\FileResponse( $file->getFileinfo()->getRealPath(), //$file->getContent(), $file->getFilename(), $file->getMimeType() )); $this->terminate(); }