code: public function allowMimeTypes($mimeTypes)
      {
          if (!is_array($mimeTypes)) {
              $mimeTypes = [$mimeTypes];
          }
          $this->constraints[] = new MimeTypeConstraint($mimeTypes);
          return $this;
      }
docs: Set allowed mime types.
  
  @param array|string $mimeTypes
  @return $this