def is_archive(file: FileStorage) -> bool:
"""Checks whether the file ends with a known archive file extension.
File extensions are known if they are recognized by the archive module.
:param file: Some file
:returns: True if the file has a known extension
"""
return file.filename.endswith(_known_archive_extensions)
评论列表
文章目录