コード例 #1
0
ファイル: FileController.php プロジェクト: symcloud/symcloud
 private function getContent(TreeFileInterface $file)
 {
     // TODO streaming
     $response = new Response($file->getContent());
     $response->headers->set('Content-Type', $file->getMimeType());
     return $response;
 }
コード例 #2
0
ファイル: File.php プロジェクト: symcloud/symcloud
 /**
  * @return string
  *
  * @VirtualProperty()
  */
 public function getMimetype()
 {
     return $this->node->getMimetype();
 }