class_docstr: Validator which succeeds if the uploaded file is allowed by a given list
      of extensions.
  
  Examples:
  ```python
  from apiflask import Schema
  from apiflask.fields import File
  from apiflask.validators import FileType
  
  
  class Image(Schema):
      image = File(required=True, validate=FileType(['.png']))
  ```
  
  Arguments:
      accept: A sequence of allowed extensions.
      error: Error message to raise in case of a validation error.
          Can be interpolated with `{input}` and `{extensions}`.
  
  *Version added: 2.1.0*
code: def __call__(self, value: FileStorage) -> FileStorage:
      if not isinstance(value, FileStorage):
          raise TypeError(
              f"A FileStorage object is required, not {type(value).__name__!r}"
          )
  
      _, extension = (
          os.path.splitext(value.filename)
          if value.filename
          else (None, None)
      )
      if (
          extension is None
          or extension.lower() not in self.allowed_types
      ):
          raise ValidationError(self._format_error(value))
  
      return value
  
imports: import os
  import typing
  from marshmallow.exceptions import ValidationError
  from marshmallow.validate import ContainsNoneOf
  from marshmallow.validate import ContainsOnly
  from marshmallow.validate import Email
  from marshmallow.validate import Equal
  from marshmallow.validate import Length
  from marshmallow.validate import NoneOf
  from marshmallow.validate import OneOf
  from marshmallow.validate import Predicate
  from marshmallow.validate import Range
  from marshmallow.validate import Regexp
  from marshmallow.validate import URL
  from marshmallow.validate import Validator
  from werkzeug.datastructures import FileStorage
  from .helpers import get_filestorage_size
  from .helpers import parse_size
label_desc: Use image node_id 3 for calling the FileType obj's underlying member method code with example usage: obj.__call__(value) and returns: value