Example #1
0
 /**
  * Sends the file associated with the given model to the user.
  * @param File $file the file model.
  * @param boolean $terminate whether to terminate the current application after calling this method.
  * @see CHttpRequest::sendFile
  */
 public function sendFile($file, $terminate = true)
 {
     Yii::app()->request->sendFile($file->resolveFilename(), $file->getContents(), $file->mimeType, $terminate);
 }