* Fix bug * Fix bug * Fix bug
@@ -109,11 +109,10 @@ def infer_file_type(url: str) -> Optional[FileType]:
match_ = re.match(
r"attachment;filename=(.*)", params["responseContentDisposition"][0]
)
- if not match_:
+ if match_:
file_type = mimetypes.guess_type(match_.group(1))[0]
- if file_type is None:
- return None
+ if file_type is None:
+ return None
if file_type.startswith("image/"):
return "IMAGE"