Exemplo n.º 1
0
 /**
  * @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();
 }
Exemplo n.º 2
0
	/**
	 * @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();
	}