コード例 #1
0
ファイル: FileUpload.php プロジェクト: visol/media
 /**
  * Get allowed extension.
  *
  * @return string
  */
 protected function getAllowedExtensions()
 {
     return implode("','", PermissionUtility::getInstance()->getAllowedExtensions());
 }
コード例 #2
0
ファイル: UploadManager.php プロジェクト: visol/media
 /**
  * Check whether the file is allowed
  *
  * @param string $fileName
  */
 public function checkFileAllowed($fileName)
 {
     $isAllowed = $this->checkFileExtensionPermission($fileName);
     if (!$isAllowed) {
         $these = PermissionUtility::getInstance()->getAllowedExtensionList();
         $this->throwException('File has an invalid extension, it should be one of ' . $these . '.');
     }
 }