Example #1
0
 /**
  * {@inheritdoc}
  */
 public function validate(FileInfo $file)
 {
     if (!in_array($file->getMimeType(), $this->allowTypes)) {
         $this->errorCode = ErrorStore::ERROR_CUSTOM_MIME_TYPE;
         $this->errorMsg = 'File type is not valid';
         return false;
     }
     return true;
 }